Answer the question
In order to leave comments, you need to log in
How to clear the entire page cache with cache.delete()?
Good afternoon!
How to clear the entire cache (scripts, styles, etc.) of a page after it has loaded, using cache.delete()
?
window.addEventListener('DOMContentLoaded', function() {
// какое-то действие...
// вычищаем кэш всей страницы (скрипты, стили)
cache.delete(/* ??? */);
});
Answer the question
In order to leave comments, you need to log in
I so understand it is a question of CacheStorage. All scripts, styles, pictures, etc. do not automatically fall into this repository. So the answer to your question is no . If you want to remove caching, you should use special headers, meta tags, and you can also use URL randomization when requesting downloadable resources.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question