Answer the question
In order to leave comments, you need to log in
How to solve the problem of caching scripts and styles when updating the site?
When I update the site - I have to rename the style files and scripts - so that other people would immediately see the site normally - but I'm already tired of doing this. Maybe there is some generally accepted way?
Answer the question
In order to leave comments, you need to log in
GET parameters. There are even automated solutions<script src="/script.js?v=12345"></script>
GET parameters will work, riot26 's answer is essentially correct. But it is GET parameters that have a drawback - Google PageSpeed Test and similar tools swear and explain the reason. Personally, I prefer the other way - to use a unique identifier as part of the file name, and at the server level, route the request to the desired file. You can read more here .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question