Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to clear browser cache programmatically?

Tags:

c#

asp.net

I try to clear the firefox 8 browser cache using programmatically. I am developing as a site using asp.net, I need to clear the browser cache for the security reason. I tried many ways to clear the cache but none seems to work. Any ideas?

like image 422
user1070716 Avatar asked Nov 29 '22 09:11

user1070716


1 Answers

Yes you can do it But........

You can't clear a browser's history via code because of browsers security reasons.

But you can delete all the files and folders under browsers "cache" directory using file operation.

eg. Mozilla's default cache location(hidden) is "..AppData\Local\Mozilla\Firefox\Profiles\2nfq77n2.default\Cache"

How to delete all files and folders in a directory? try it!

like image 92
Tokendra Kumar Sahu Avatar answered Dec 15 '22 14:12

Tokendra Kumar Sahu