React › Static Site Generation (SSG) & Hydration
Why does a statically generated website often load faster than one that renders pages on every request?
BeginnerAnswer
Since the HTML for a statically generated page was already built ahead of time, the server, or often a content delivery network located physically close to the visitor, can send the finished file immediately, without spending any time computing anything at the moment of the request.
// Once built, this page is just a plain HTML file, ready to serve instantly
// No server computation is needed when a visitor requests it
// dist/about/index.htmlReal-world example A company's marketing site, built entirely with static site generation, consistently loads in under half a second for visitors around the world, since every page is served instantly from cached files close to each visitor's location.