Answer the question
In order to leave comments, you need to log in
How to kill cached files on the client side?
Hello!
For the first time, a more or less visited resource came across. The task is to update the layout and images from /assets/. The problem is in Chromium based browsers. In my opinion, this is a fairly large part of the audience. These browsers cache everything that can be cached.
I adapted CSS and JS by adding arguments to the link, and it seems to work. At least no problems so far. But what about the pictures?
I have some sections of the site displayed in the menu with pictures.
These pictures are inserted directly when a new site node or post is added. And here are some of them, too, need to be cut. But they are updated only when the cache is reset. I have already listed the browsers that are especially resistant to this. How to be?
ps: And on different machines (windows, linux) browsers behave differently.
Answer the question
In order to leave comments, you need to log in
If, I understand correctly, you need to disable caching. Send a header with a prohibition.
header("Cache-Control: no-store");
UPD:
<meta http-equiv="Cache-Control" content="no-store">
//same thing, but through the tag
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question