Search code examples
javascripthtmlcachingbrowser-cache

How to enable "Disable Cache" in browser network tab?


Hy there, I am building a web page in jsfiddle, and every time i run the script it load whole libraries again so i decide to put it into cache, by enabling the "disable cache" in the dev tool

https://i.sstatic.net/Zcob9.png

Is there any way to enable or disable the cache by js or html ?


Solution

  • When you check on Disable cache, exact opposite happens to what you're trying to do. The browser fetches the latest resources. instead of the using the ones which it has already cached.

    enter image description here

    So, this is how your configurtion will look like when Disable cache is enabled. To enable caching you might like to uncheck it.

    To enable cache using JavaScript, you can utilise the browser's Cache API.