3 回答

TA貢獻(xiàn)1900條經(jīng)驗 獲得超5個贊
對于IE,我記得必須設(shè)置Expires: -1。 如何防止Internet Explorer中的緩存似乎通過以下代碼片段進(jìn)行了確認(rèn)。
<% Response.CacheControl = "no-cache" %>
<% Response.AddHeader "Pragma", "no-cache" %>
<% Response.Expires = -1 %>
回顧代碼,這就是我發(fā)現(xiàn)的。另外,我隱約記得,如果設(shè)置Cache-Control: private為SSL,則可能無法正確運行。
Response.AddHeader("Cache-Control", "no-cache");
Response.AddHeader("Expires", "-1");
另外,所以,您不想緩存,是嗎?提及-1,但Response.Cache改為使用方法:
// Stop Caching in IE
Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache);
// Stop Caching in Firefox
Response.Cache.SetNoStore();
但是,ASP Page緩存問題(IE8)表示此代碼無效。
- 3 回答
- 0 關(guān)注
- 615 瀏覽
添加回答
舉報