R
R
Roman Rakzin2016-03-25 21:33:37
JavaScript
Roman Rakzin, 2016-03-25 21:33:37

How to completely clear the Application Cache via javascript?

I decided to use Application Cache, but how can I completely remove it now?
I decided to write in the manifest file - load all files, which is basically the same as deleting the
NETWORK:
* cache
, but for some reason the data is cached anyway.
I found an article that says how to clear the Application cache in chrome
> https://imwill.com/how-clear-html5-app-cache-chrom...
But I won't tell all users to go there :)
In general, how to get rid of of this cache via javascript if already installed?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
khipster, 2016-03-25
@khipster

Delete the manifest. If the manifest request returns 404, the cache will be cleared.

S
Sergey Sokolov, 2016-03-26
@sergiks

Mozilla recommend updating the manifest file and calling the method window.applicationCache.swapCache()- but it will not update the files already loaded in the application. Therefore, after that it would be good to reload the page as well.
ps In general, AppCache is deprecated, you should not use it. Instead - Service Workers .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question