Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programmatically clear HTML 5 application cache in log-on/log-off scenario

HTML 5 offline logic is encapsulated in window.applicationCache object. However it looks like it's not possible to programmatically clear cache data, for example, when user logs off from the system. Is there any other way to clear HTML 5 application cache, except for generating empty manifest file?

like image 205
Konstantin Avatar asked Feb 24 '23 15:02

Konstantin


2 Answers

Have observed this on Chrome not sure if that's the standard way, if server responds with 404 on manifest file request, cache gets cleared from browser after raising obsolete event.

like image 180
programmer Avatar answered Feb 26 '23 09:02

programmer


Setting aside the specifics of the HTML5 appcache, clearing a browser's cache programmatically has never been possible (beyond certain ActiveX controls for that browser) so I suspect you may come up empty on this one. Perhaps you should focus on the cache control meta tag and test further with your empty manifest idea?

like image 39
Ben Avatar answered Feb 26 '23 09:02

Ben