R
R
Roman Fov2015-06-13 18:43:53
Google Chrome
Roman Fov, 2015-06-13 18:43:53

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

2 answer(s)
A
Andrew, 2015-06-13
@Ashlst

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

V
Vlad Zhivotnev, 2015-06-13
@inkvizitor68sl

Arguments can be added to URLs before any files.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question