读书人

js清理ie缓存,该如何解决

发布时间: 2012-01-24 23:11:54 作者: rapoo

js清理ie缓存
请教各位,如何使用js 或者 jsp清理页面缓存,cookies 等ie痕迹?

[解决办法]
在页面的head中加入:

HTML code
<META HTTP-EQUIV="pragma" CONTENT="no-cache"><META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate"><META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
[解决办法]
HTML code
<%response.setHeader("Pragma","No-cache"); response.setHeader("Cache-Control","no-cache"); response.setDateHeader("Expires", 0); %><meta http-equiv="pragma" content="no-cache">  <meta http-equiv="cache-control" content="no-cache">  <meta http-equiv="expires" content="0">  <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">  <meta http-equiv="description" content="This is my page">本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/nihaozhangchao/archive/2010/01/15/5194873.aspx 

读书人网 >Java Web开发

热点推荐