Author's Cache Header Config Failed Silently, Serving Default One-Hour Caching
A developer documented caching headers for their static Next.js site on Firebase Hosting, only to find via curl that the live responses did not match the policy described. Every page and text file was being served with Firebase's default one-hour cache lifetime. The cause was a glob pattern matching request paths, while clean URLs meant readers never requested .html files, so the no-cache rule never applied. A separate rule meant to cache hashed assets for a year also caught manually placed files like a headshot and site icon, which could stay stale for returning visitors after replacement. The author notes the lesson of verifying deployed output rather than only the config file.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in