samedi 4 septembre 2021

How to I make the cache reset for people who have gone to my website before

I'm trying to work on a website and every time I make some new code in my JavaScript file and deploy it I get more issues with it using the old code despite the new code is confirmed to be live on the server. The code works the new way on LiveServer in VSCode but once it's online it's just not working.

I found out that it's because it has the data from the old version cached in my web browser and ctl+f5 makes it where I can test. This is an issue I want to permanently fix so anyone that visits my site doesn't have to experience these issues whenever I deploy a new version. I'm looking to maybe force the cache to reset every time someone either joins or leaves the webpage, either one is fine.

How would I go about doing this?




Aucun commentaire:

Enregistrer un commentaire