S
S
Shimpanze2018-03-06 07:40:36
JavaScript
Shimpanze, 2018-03-06 07:40:36

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(/* ??? */);
});

Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Tsvetkov, 2018-03-06
@yellow79

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 question

Ask a Question

731 491 924 answers to any question