捕風之巢

          統計

          留言簿(3)

          java友情鏈接

          閱讀排行榜

          評論排行榜

          禁止IE緩存的方法

          禁止頁面內容緩存:

          ? HTM 網頁 ?

          ? <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">?

          ? ASP 網頁 ?

          ? <%?

          ????? Response.Expires?? =?? -1?

          ????? Response.ExpiresAbsolute?? =?? Now()?? -?? 1?

          ????? Response.cachecontrol?? =?? "no-cache"?

          ? %>?

          ? PHP 網頁 ?

          ? header("Expires:?? Mon,?? 26?? Jul?? 1997?? 05:00:00?? GMT");?

          ? header("Cache-Control:?? no-cache,? ?must-revalidate");?

          ? header("Pragma:?? no-cache");?

          ? JSP?

          ????????? response.setHeader("Pragma","No-Cache");?

          ????????? response.setHeader("Cache-Control","No-Cache");?

          ????????? response.setDateHeader("Expires",?? 0);?

          ? C# 中禁止 cache 的方法! ?

          ? Response.Buffer=true;?

          ? Response.ExpiresAbsolute=System.DateTime.Now.AddSeconds(-1);?

          ? Response.Expires=0;?

          ? Response.CacheControl="no-cache";?

          ?

          禁止圖片緩存:

          在圖片后面加一個隨機參數,如:

          <img src=”images/bg.gif?temp_id=156404/>

          ?

          經測試,有效。

          ?

          posted on 2007-03-02 14:01 捕風 閱讀(3431) 評論(0)  編輯  收藏 所屬分類: web 頁面開發

          主站蜘蛛池模板: 夏邑县| 汪清县| 五寨县| 大悟县| 博兴县| 绥滨县| 巴里| 泾川县| 永新县| 湟中县| 深州市| 苍山县| 天全县| 潞西市| 阜城县| 永登县| 灌阳县| 离岛区| 辽中县| 额尔古纳市| 壤塘县| 新沂市| 玉屏| 会东县| 海兴县| 南阳市| 新干县| 基隆市| 怀宁县| 若尔盖县| 木兰县| 东兰县| 泰来县| 绵竹市| 新沂市| 仙桃市| 丹凤县| 通州区| 探索| 富蕴县| 怀仁县|