Auto Refresh Assets If There's a Change to JS and CSS

Everytime I update JS and CSS, those assets can’t be refresh automatically. I have to visit those asstes link directly and hard refresh to get a new version, unless I will always get the stale assets version.

I can’t sure if it related with “Cache-Control” or “Expect-CT” or another value on my netlify.toml file. But I need every visitors get new assets version if I make a change to my JS and CSS. Any reference about what’s the best value and how to configure it?

Hey @BayuAngora,

I’m not sure what the dealio is here but it sounds a little… out of the ordinary!

We’re proud of our atomic deploys. As such, we shouldn’t be serving old content.

Can you give this support guide a read any let me know what, if anything, you may have changed?

After I dig some investigation, the problem is from my “Strict-Transport-Security” headers with “31356000” value. This is really hard decision. Because if I keep this value, then cache can’t be purged, unless if visitors make hard refresh on the assets URL directly. But if I turn the value down, then I will get a warning here -> https://hstspreload.org/

Everything is fixed after I gradually change “max-age” value to “0”.