Disable Application Cache in Chrome and Safari
Asked Answered
I

1

12

I’m using the AppCache in order to enable offline access for a web app. The issue is that for development every time I make a change to my JavaScript I also need to make a change to the manifest (in order to trigger a re-download of the cached field). Now I know that in FireFox you can disable the AppCache (in fact you are prompted when you first visit the page whether to grant permission to web site to store data locally) which makes it a lot more convenient for development.

My question is there a similar option for chrome and safari? I know that I can view/Edit the AppCache in chrome via chrome://appcache-internals/, what I’m looking for is a way to disable it.

Thanks

Ingest answered 3/5, 2012 at 16:27 Comment(0)
C
16

In Chrome, use Incognito Mode, meaning nothing will be cached.

I assume there's similar 'Private Browsing' functionality available in Safari.

EDIT: I see from your comment that you want to disable Cache Manifest functionality only. Try starting Chrome from a Command Line with the --disable-application-cache switch.

Cid answered 10/5, 2012 at 13:56 Comment(2)
That's a good suggestion (and I've used it in the past), but the problem with using Private browsing/Incognito Mode is that not only does it not use the AppCache it won't use the local storage either. What I'm looking for is just to be able disable the AppCache (Simular to how it's done in FireFox).Ingest
OK that does indeed disable the AppCache, however I now need to add a check in my code before attempting to add an event handler to it as it now comes up as “undefined”. This isn’t really that big of a deal, but ideally I wouldn’t need to add that check (In Firefox it just doesn’t use the appcache it but it doesn’t come up as undefined). I realize that I phrased my question asking for a way to disable the appcache and your solution definitely does that. Another thing is It would be nice if I could just do it on a site basis without needed to start up chrome differently.Ingest

© 2022 - 2024 — McMap. All rights reserved.