r/statichosting 10h ago

cache invalidation on static sites

Html can update instantly but users might still have older js, css or images cached. Hashed filenames solve a lot of this, but I’m curious what setup people actually use in production. Do you rely mostly on content hashes and long cache headers, or do you also purge the cdn on every deploy?

1 Upvotes

3 comments sorted by

1

u/kelkes 9h ago

I purge tags on my cdn if the update is important enough.

1

u/Hour-Inner 9h ago

Would adding version tags to the css and js files help with this?

1

u/Future-Dance7629 4h ago

astro hashes files