Re:300ms Faster: Reducing Wikipedia's Total Blocking Time
by austinpena on Monday May 29, 2023 @05:50PM
(#36118522)
Depends how pages are generated. If they are using getStaticProps this is not true because the HTML needs to be "hydrated" with the React runtime which requires javascript. Astro will prebuild the static pages.
Look for a tag like this: <script id="__NEXT_DATA__" type="application/json">
Re:300ms Faster: Reducing Wikipedia's Total Blocking Time
by undefinedzero on Monday May 29, 2023 @06:45PM
(#36119000)
The page will render perfectly fine before it is hydrated when using getStaticProps. To verify , simply run LightHouse in Chrome on a page with cache busting on and look at the screenshot timeline. It will render in a fraction of a second, long before React gets loaded.
If the JS files are set to load asynchronously, the initial load should be almost equally as fast, and React should load in the background. Afterwards, additional navigation should be near instant.