D
D
Denis Dorosh2019-02-27 11:53:58
Android
Denis Dorosh, 2019-02-27 11:53:58

How to disable cache in mobile browsers?

Tell me, please, who is struggling with this problem?
the site is being debugged and if on the desktop there are no problems with this, then with mobile devices there are always problems with caching.
caches everything, cleaning before each page update is very annoying, and for some reason everything is not always cleaned (for example, js sometimes just doesn’t want to reset the cache o_O) I’m
interested in a solution for both android and iOS.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pavel Volintsev, 2019-03-02
@copist

Caching must be suppressed
Add a version to the URL of each static file.
For development - the version should change often, I use pseudo-random strings like For product builds, I use the build version from , or from the config file, or the current revision code if the application is built from the git repository. The latter option more accurately determines the fact of changes. 'app.js?v=' + Math.random()
package.json

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question