Is there a way to clear all of my application’s local data with javascript?
I would like to clear:
Session Storage
Cookies
Local Storage
Application Cache (html5 spec)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Think you would have to deal with each individually as each browser would implement differently.
and for cookies there is already a good answer on SO
You could of course just put these into your own function.
If the application cache is server side you could have an ajax call to a http post that deletes this.
UPDATE:
it is advised against clearing application cache, http://www.whatwg.org/specs/web-apps/current-work/#expiring-application-caches. What would you be storing there that you would want deleted?