views:

55

answers:

4

Hi everyone

How to delete all cache in JavaScript?

Thanks a lot.

+3  A: 

You can't.

If you don't want browsers to cache things from your site, tell them not to do that with the proper HTTP headers.

Matti Virkkunen
A: 

See:

So, You Don't Want To Cache, Huh?

Sarfraz
+1  A: 

Sorry, it's up to the user to delete his or her own cache. You can't do it from Javascript.

Andy E
A: 

You can't delete it but one idea to make sure that new images/javascript are picked up during (perhaps) a new server side release is to name your javascript and image files with the date/version of the release encoded as a number. You can automate this so that the thing works fine every time you release.

Noufal Ibrahim