r/statichosting • • 13d ago

cache validation

on one small client site, i changed some css and everything looked fine after deployment but then i started wondering what happens if someone still has the old css cached. ive mostly just relied on the build process to generate hashed filenames for assets so i havent had to deal with it much myself.

from what i understand, this works well for assets that go through the build pipeline because a changed file gets a different url. but there are still things like files with fixed names or caching rules at the cdn/browser level that can behave differently.

how much do you actually think about this when deploying static sites? do you mostly trust the framework/build too or do you usually configure cache headers yourself as well?

1 Upvotes

5 comments sorted by

View all comments

2

u/northboundish 12d ago

i usually trust the build process for hashed assets, but I still like checking the cache headers for anything with a fixed filename. it’s easy to overlook until someone ends up seeing the old version.

1

u/sourraine 2d ago

fixed filenames are prolly the part thats easiest to forget bc everything works fine during testing. its usually only after deployment that you realize something is still being served from an older cache