如何清除浏览器缓存编程? [英] How to clear browser cache programatically?

查看:146
本文介绍了如何清除浏览器缓存编程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用编程方式清除火狐8浏览器缓存。我使用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?

推荐答案

是的,你可以这样做,但........

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

您无法通过的,因为浏览器安全原因code清除浏览器的历史记录。

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

但是,使用可以删除所有浏览器下的缓存目录中的文件和文件夹
文件操作

如。 Mozilla的默认缓存位置(隐藏)是
..AppData \\本地\\ Mozilla的\\火狐\\ Profiles文件\\ 2nfq77n2.default \\缓存

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

<一个href=\"http://stackoverflow.com/questions/1288718/how-to-delete-all-files-and-folders-in-a-directory\">how删除所有文件和文件夹的目录?
试试吧!

这篇关于如何清除浏览器缓存编程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆