I Documented My Static Site's Cache Headers. curl -I Says Otherwise.
A few weeks ago I wrote up how my personal site is built for search engines and AI crawlers: a static Next.js export, one typed registry of posts that drives everything, Article and FAQ structured data, an llms.txt , IndexNow on deploy, and a caching policy on Firebase Hosting. I described that caching policy with some confidence. HTML gets max-age=0, must-revalidate , hashed assets get cached…
A few weeks ago, the author wrote about their personal site being built with a static Next.js export, structured data, and a caching policy on Firebase Hosting. They confidently described the caching policy, with HTML getting max-age=0, must-revalidate, and hashed assets cached for a year. However, they ran curl -I against the live site and found that every page, including llms.txt, sitemap.xml, and client-side navigation payloads, were served with a default one-hour cache-control.
The author then discovered two mismatches due to their habit of verifying the config file but never the output.
The first mismatch is with the caching policy, which has the opposite problem of the intended design. The immutable cache rule for a year applies to hashed files, but not to manually added files like the author's headshot and site icon. The glob in firebase.json was written for hashed bundles and pointed at file extensions instead of the hashed files folder. The author also found that the start kit included several SVG files, which were cached as immutable, indicating they had not looked closely at the out/ directory.
The second mismatch involves the canonical tag in the site's sitemap. The canonical tag has no trailing slash, while the framework automatically adds it when rendering metadata. This issue affects the sitemap, app/sitemap.ts, which maps over the registry with a URL without a trailing slash. Additionally, the Article JSON-LD structured data points at a redirect, while the canonical tag next to it points to the correct page.
Finally, the llms.txt file has URLs without a trailing slash, which does not break anything visible but contradicts the author's claim of "one typed registry, everything derived from it, so nothing can drift."
Rewritten by urgent.news; may contain errors — check the original.