Comment: html5 application cache is used in our 3G version of the website project, and most of the image resources, js, css and other static resources are placed in the manifest file. Friends who need to know can refer to it.
In our 3G version of the website project, we used html5 application cache, and placed most image resources, js, css and other static resources in the manifest file.Unexpectedly, I encountered a serious problem on the first day of online launch: the application cache will cache the current page by default! ! ! Even if we have the following settings:
NETWORK:*
In other words, for all dynamic pages, the application cache will be cached, and no matter how users refresh, it will be old!
Moreover, it is difficult to clear the mobile browser, and it does not support JS clearing!
I spent a whole morning trying many methods and checking a lot of information, but I couldn't clear the client's cache. I was complained badly by users in the morning.
In the end, the universal stackoverflow saved me:
Do not use appcache unless it is REALLY 100% EXACTLY WHAT YOU WANT TO DO
Even if it IS 100% EXACTLY WHAT YOU WANT TO DO, *DO NOT* use appcache until you are 100% CERTAIN that you are not going to make a single change to that page (or any file that it links to) for a LONG time.
Delete the manifest file from the server -- if the browser can't find the manifest file, then it will clear its cache... ...this will also turn caching off for everyone.
Don't turn it on again until it's 100% CORRECT
Dealing with appcache is miserable, often.
The solution is very simple. Delete the manifest file on the server side and use application cache with caution.
Of course, there is also a way to use application cache, which can bypass the problem of automatically caching the current page. That's using an iframe