捕風之巢

          統計

          留言簿(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 頁面開發

          主站蜘蛛池模板: 池州市| 武义县| 法库县| 芦山县| 廉江市| 株洲县| 历史| 青岛市| 广宗县| 蕉岭县| 鲁山县| 若尔盖县| 永修县| 邵东县| 崇信县| 淮南市| 喀喇沁旗| 深水埗区| 鹿泉市| 宜川县| 旺苍县| 梨树县| 迁西县| 波密县| 来凤县| 鸡西市| 永宁县| 上思县| 青州市| 灵石县| 莱芜市| 阿拉善右旗| 鲁山县| 类乌齐县| 宁城县| 韶山市| 雅安市| 边坝县| 普安县| 霍林郭勒市| 云和县|