针对页面,通过设置过期时间 <meta http-equiv="expires" content="Thu,31 Dec 2020 23:59:59 GMT">,使页面仅在浏览器刷新时才从服务器读取。
针对图片,每次从服务器上取的是背景图片,在网上查询到,有人讲这是IE6的bug,背景图片不读缓存,都是从服务器取。有人给出了解决办法:jsp中加入以下代码得以解决:
<script type="text/javascript">
try {
document.execCommand("BackgroundImageCache", false, true);
} catch(err) {
}
document.execCommand("BackgroundImageCache", false, true);
} catch(err) {
}
</script>
同事 塔长城 提供,并验证
空间不错呀! 有空也到我那里坐坐呀! 期待哦!
兰州妇科网 —— 2009年05月05日 @4:05 pm