Programmatically clear HTML 5 application cache when logging in / out

HTML 5 autonomous logic is encapsulated in a window.applicationCache object. However, it seems that it is not possible to programmatically clear cache data, for example, when a user logs out. Is there any other way to clear the HTML 5 application cache, except for creating an empty manifest file?

+4
source share
3 answers

By discarding the specifics of HTML attacks, clearing the browser cache programmatically was never possible (outside of the specific ActiveX controls for that browser), so I suspect you might be empty on that. Perhaps you should focus on the cache management meta tag and test further with an empty manifest idea?

+3
source

I watched this in Chrome, I'm not sure if the standard method, if the server responds 404 to the manifest file request, the cache is cleared from the browser after raising an outdated event.

+5
source

I think the best way to do this is to change the link to the manifest file. In this case, I will add the user session identifier to the manifest file. Each user should have a session regardless of the login state, and the session identifier should probably change upon login / logout (possibly).

I also found this answer: Removing the HTML5 Appcache manifest, permanently

0
source

All Articles