B
B
belka_vs_suslik2015-06-27 11:56:05
PHP
belka_vs_suslik, 2015-06-27 11:56:05

How to update cached files on the user side?

Updated several css and js files. Without updating the cache, changes are not displayed on the user's device.
How to update cached files on the user side?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Melnikov, 2015-06-27
@belka_vs_suslik

you can try adding the file version to the path (that is, the path itself will be different, respectively, the browser will understand that this is already a different file), you can do it like this

<link href="css/styles.v2.css" rel="stylesheet">
<script src="assets/js/script.v3.js"></script>

or
<link href="css/styles.css?v4" rel="stylesheet">
<script src="assets/js/script.js?v5"></script>

javascript.ru/optimize/cache-versioning

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question