在iframe中加载url时清除url缓存
clear url caching when it is loaded in iframe
我正在加载一个iframe中的url内容。所以现在url信息自动下载到用户的临时文件夹。我已经使用了下面的代码:
<meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="0">
如何避免所有浏览器的缓存?如何避免url缓存时,它是加载在iframe?
需要你的建议与例子…
// Stop Caching in IE
Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache);
// Stop Caching in Firefox
Response.Cache.SetNoStore();
以下响应头由这些语句添加:
Cache-Control: no-cache, no-store编译指示:no - cache
也读这个,我发现它在asp.net论坛:
Use the following tags inside head tag of your page.
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
Both the above tags should be included if you are not sure if server is HTTP/1.1 compliant. Also Include:-
<META HTTP-EQUIV="EXPIRES"
CONTENT="Mon, 22 Jul 2002 11:12:01 GMT"> tells the server which cache the page to expire the page in given time interval. An invalid interval like "0" or "-1" expires it immediately and causes a fetch of latest version of file, each time request is made.
you can get complete info at this link :- http://www.i18nguy.com/markup/metatags.html
no-cache
指令导致浏览器每次加载页面时都请求内容。这和阻止它下载不是一回事。
这听起来不像是你在试图避免缓存,而是你在试图避免将下载的文件保存到本地文件系统。no-store
是实现这一目标的方法,但这并不意味着浏览器不能存储,而是它必须"尽最大努力"避免将文件存储在非易失性存储中。
我不知道如果没有临时存储文件,是否有浏览器支持这个-我找不到任何支持图表。
相关文章:
- 如何使用url加载程序在webpack中导入多个图像
- 使用php或javascript从facebook相册URL中删除多余的部分
- Angular JS IE9 Hashbang url rewriting
- 使用服务工作者动态缓存HTTP URL的包装器
- "未定义的“;以及“;高速缓存/xxx”;已附加到URL
- jQuery:加载具有ajax,缓存,干净URL和后退按钮支持的页面
- Safari 将 URL # 片段合并到其浏览器缓存中
- 另一种在javascript中创建随机动态url的方法/阻止wpengine缓存
- 如何使用随机令牌重新加载带有 AJAX 的 PHP 脚本,URL 正在缓存
- 使用 RequireJS 的 URL 缓存破坏参数
- 如何让Phonegap InAppBrowser不缓存url内容
- 如何打开一个新的URL与javascript和没有缓存
- 在iframe中加载url时清除url缓存
- jQuery json缓存,是否有办法改变时间戳url键
- 当应用程序缓存回退url不可加载时会发生什么
- 缓存本地文件中的URL's以便稍后上载
- ASP.. NET - windows . open (URL) -文件被缓存,我如何停止它
- 任何浏览器都会忽略带有查询字符串的url的缓存控制标头吗?
- 为防止ie缓存,在Jquery函数url后添加唯一值
- 如何在显示图像之前从URL缓存图像