HTML語法只要加上Pragma及Expires
<HTML><HEAD>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
</HEAD><BODY>
</BODY>
</HTML>
C# ashx寫法如下
context.Response.ContentType = "text/plain";
context.Response.Cache.SetCacheability(HttpCacheability.NoCache);
context.Response.CacheControl = "no-cache";
context.Response.AddHeader("Pragma", "no-cache");
context.Response.Expires = 0;
搜尋
如何避免網頁暫存cache
張貼者:
Godhelp
at
2009年12月29日 星期二
0 意見:
張貼留言