browser-cache

What is the JavaScript equivalent of “Clear Site Data” in Chrome Dev Tools?

余生颓废 提交于 2020-07-18 03:44:32
问题 I am looking for a way to trigger the same behavior as "Clear site data" in Chrome Dev tools or as close to the same behavior as possible. I know there are some things that are not possible i.e. clearing browser cache, and this doesn't need to be within the scope of this question. I am not sure if Clear Site Data does some special things other than clearing cookies, Web SQL/IndexedDB and unregistering service workers. I use localForage in some of the projects I work on so cleaning IndexedDB

Leverage browser caching for external files

回眸只為那壹抹淺笑 提交于 2020-06-10 07:44:08
问题 i'm trying to get my google page speed insights rating to be decent, but there are some external files that i would want to be cached aswell, anyone knows what would be the best way to deal with this? https://s.swiftypecdn.com/cc.js (5 minutes) https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js (60 minutes) https://pagead2.googlesyndication.com/pagead/osd.js (60 minutes) https://www.google-analytics.com/plugins/ua/linkid.js (60 minutes) https://hey.hellobar.com/

Leverage browser caching for external files

爱⌒轻易说出口 提交于 2020-06-10 07:43:29
问题 i'm trying to get my google page speed insights rating to be decent, but there are some external files that i would want to be cached aswell, anyone knows what would be the best way to deal with this? https://s.swiftypecdn.com/cc.js (5 minutes) https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js (60 minutes) https://pagead2.googlesyndication.com/pagead/osd.js (60 minutes) https://www.google-analytics.com/plugins/ua/linkid.js (60 minutes) https://hey.hellobar.com/

Which browsers have a back-forward cache? (a bfcache keeps modifications to DOM)

喜欢而已 提交于 2020-03-16 10:38:51
问题 Which browsers nowadays support a back-forwards cache (bfcache)? A back-forwards cache is a browser's in-memory cache that is used when a user clicks the back button and the forward button. It stores the state of the page as it was when the user navigated away, so any changes made to the DOM should be loaded instantly. Note that this is different from the normal caching mechanisms that all browsers have. A bfcache applies specifically when a user clicks the back button, and can handle dynamic