您的位置:首页 > 其它

页面缓存问题

2016-05-29 15:31 288 查看
缓存问题

方式1、打开的URL后加一个随机参数,避免缓存;

var sUrl = 'page1.aspx?nocache=' + Math.random(); 

window.showModalDialog(sUrl, window, "dialogWidth:400px;dialogHeight:400px;status:0;help:0;resizable:0;center:1;");

方式2、设定页面不缓存,在<head>中加入以下代码

<meta http-equiv="pragma" content="no-cache">  

<meta http-equiv="cache-control" content="no-cache">  

<meta http-equiv="expires" content="0">
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: