In my web application I wants the java script to clear the cache when the user close the browser.
The javascript should listen to the event and clear the cache.
Can anyone please provide me sample code or any useful link?
In my web application I wants the java script to clear the cache when the user close the browser.
The javascript should listen to the event and clear the cache.
Can anyone please provide me sample code or any useful link?
For clearing Cache followiwng link is helpful Clear the cache in JavaScript
You write some javascript run when you try to close the browser like below
But why do you need to clear cache before closing browser?
With JavaScript its not possible. But using no-cache header you can do it.
Use one of these methods which work on all browsers
Yes this is imposible but I would sugguest you can try the meta tags or you can set a versioning system for instance like this
Technically is impossible. What you can do instead is to tell the browser to not cache the page by using the following meta tags:
Here is an article for reference http://www.htmlgoodies.com/beyond/reference/article.php/3472881