Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clear browser cache using jQuery

Tags:

jquery

caching

In my mini project i'm trying to crop an already uploaded image and then show the cropped image in place of the original image in the gallery page. But after I'm done with cropping i'm shown the the original image when i'm redirected to the gallery page even refreshing the page doesn't work. I have to clear the browser's cache in order to see the cropped image. Can i clear the browser's cache using jQuery?

like image 416
Xylon Avatar asked Sep 12 '26 23:09

Xylon


1 Answers

Just go through this link, it is not possible to clear cache but can prevent it by using metatag "no cache" or either in http headers. but alternatively can do this by using parameters,refreashing etc. or javascript file name versioning so browser will download it always.

http://www.sitepoint.com/forums/showthread.php?866717-How-to-force-the-user-s-browser-to-clear-its-cache

http://www.sitepoint.com/caching-php-performance/

like image 68
Aksh Avatar answered Sep 15 '26 11:09

Aksh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!