firefox - How to clear Application cache (HTML5 feature) using JavaScript? -


our web-application uses application cache (cache manifest) restore html page , resources in off-line mode. html-pages have sessionids params in uri. so, after each logout , login action new html-pages saved application cache because sessionid changed in uri. after weeks working application browsers start work slower. , size of application cache (tested on ff 3.6+) 200mb! after each logout clear localstorage of browser,but how clear resources application storage?

the problem application cache taking space giving user agent different offline web application each time. offline web application identified user agent uri of cache manifest file, including query string - not uri of master file might think.

thus, including session id in cache manifest uri, you're telling browser each session gets own brand new application without using of downloaded ones (and thus, never being able clear them out). you're installing different web application every time.

reconsider how you're architecting application, using html5 offline cache manifest providing no value - causing excessive downloading. architecture web applications encourage serving html statically, , fetching data requires sessions via ajax. web applications don't work when built in classic "dynamically generate html page data on server" paradigm.


Comments