I
I
Ingerniated2019-05-22 11:56:35
PHP
Ingerniated, 2019-05-22 11:56:35

After changing the code in the file, how to force the user's browser to update the cache itself?

Hello!
After the server was launched, it became necessary to change some styles and pictures, but the clients who had already accessed the site before the changes see it in the old style.
How to force the browser to update the cache for a given site without manual intervention on the client side?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton, 2019-05-22
@Ingernirated

href="style.css?v=<?= time()?>"

P
Puma Thailand, 2019-05-22
@opium

Use etag

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question