人妻丰满熟妇AV无码片,岛国AV无码免费无禁网站,丰满岳乱妇一区二区三区,男插女高潮一区二区

Cache-Control緩存和pragma緩存比較

技術(shù)分享 2019-10-01 00:00:00
Cache-Control 更徹底,一般瀏覽器退回時(shí)候會(huì) 直接顯示網(wǎng)頁(yè)過(guò)期,不能訪問(wèn)了
pragma 沒(méi)那么徹底,瀏覽器退后時(shí)候只是重新刷新內(nèi)容而已

代碼實(shí)例:

禁用客戶端緩存
HTM網(wǎng)頁(yè)



ASP網(wǎng)頁(yè)
<%
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1
Response.cachecontrol = "no-cache"
%>
PHP網(wǎng)頁(yè)
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";

加入

不緩存。
咨詢小瓶科技
咨詢我們
頂部