How to clean cache for my website?

This is my site: https://animanoir.xyz/
This is Netlify’s name: animanoirxyz.netlify.app

I’ve noted that in some machines the cache isn’t cleaning so every time I need to hard refresh it. How can I make sure the site gets delivered with the latest version?

Short answer is, you can’t. You can’t change how browsers have cached your content. Netlify sends the required headers along with the files, but it’s up to the browser to respect it or not. However, I’d assume all modern browsers will respect those headers.

Could you share how you expect the website to look vs how it looks when you see cached content? Also, a HAR file recording could help.

1 Like

How it should look (I need to hard refresh it)

How it looks

I’k using GSAP and a Webpack build also. Might be something within that?

Interesting, I’m getting your website as the first screenshot only. Is this happening only on your device or have you tried multiple devices?

Yeah… I don’t know if because I used to simply upload raw HTML/CSS/JS files to it AND THEN a Webpack build something in the cache got erratic.

In new devices it looks as the first screenshot, but in devices where the site was loaded before the webpack build it looks like the bottom. Hard refresh solves it.

Did you have a service worker or something in the previous deploys? Chances are it had cached the content which is causing issues. Maybe you removed it from the newer deploys which is why none of us have that problem.

I don’t know. I don’t think so since I used to upload raw HTML/JS/CSS files, and their assets. I never programmed a “service worker”. In that case, is there something I can do to solve this at least for the machines affected?

Well, if there was no service worker in the past, there is nothing to worry about.

However, after a hard refresh, could you try changing more stuff and try if you can see newly published changes or is the content not updating at all?