Static Sites at the Edge: Cache Rules Matter More Than Frameworks
Generators like Hugo turn Markdown into HTML fast; that part is rarely the bottleneck once you ship. What dominates perceived performance is how long assets stay correct at the edge: HTML can be short-lived while immutable hashed assets can be cached aggressively.
Treat HTML as dynamic with respect to navigation and metadata updates, even when the origin is static storage. Give long max-age only to fingerprinted files (main.abc123.css), and pair that with a purge or version bump path when you redeploy. If you skip invalidation, users see the new layout with old CSS—or vice versa—and it looks like a “framework bug.”
Instrumentation completes the picture. Measure Time to First Byte and Largest Contentful Paint by region, not only locally. The winning setup is boring: predictable URLs, explicit cache classes, and automation that updates both content and its references in one coherent release.
Comments
Discussion is powered by Giscus (GitHub Discussions). Add
repo,repoID,category, andcategoryIDunder[params.comments.giscus]inhugo.tomlusing the values from the Giscus setup tool.