-
I get this error for my site https://history-maps.com/ : I'm getting this on my main index page as well as my dynamic pages. Note: I'm using getStaticProps for both as a fetching method.
I'm not sure how to do that since the largest load (i suspect) are the images being loaded. If you visit my site, the images are a key component in the UX. Are there other methods or solutions to solve this problem? Also, this has an adverse effect on the Lighthouse performance. I'm currently getting a 62 on mobile. Strangely enough, I'm getting high 90s on Desktop so I'm not sure whats going on there. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
Hi, this warning is specific to the amount of data returned in the To reduce this you should only return the data that is needed to hydrate the page (first render) any additional data can be loaded client-side or on client-transition. |
Beta Was this translation helpful? Give feedback.
-
Hey buddy,It seems that you have already resolved it. my page is like your situation: Warning: The data on the page "/product/[slug]" (path "/product/uyouyou lower sea pattern flower series printed Curtain fabric 203003") is 158 kB, exceeding the threshold of 128 kB, and this amount of data may reduce performance. Can you please advise me on a careful optimization plan, dear? How can I optimize it so that the page size can be reduced to below 100kb? product/index.js
ProductDetailsCarousel.js
笔记 |
Beta Was this translation helpful? Give feedback.
-
This is my suggestion. To solve this particular problem we need to ensure to reduce the overall render page which means that some part of your content might also render even though user may not see or view it yet. I have a hooks here to to render only the particular section or component when the user tries to scroll in the bottom.
Please use it with caution
|
Beta Was this translation helpful? Give feedback.
Hi, this warning is specific to the amount of data returned in the
props
object fromgetStaticProps
, images shouldn't affect this unless they are being serialized and returned inside of props.To reduce this you should only return the data that is needed to hydrate the page (first render) any additional data can be loaded client-side or on client-transition.