在HTML里的写法以下是代码片段: <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache,must-revalidate"> <meta http-equiv="expires" content="0">
在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");
本文提供了在不同编程语言中设置HTTP头部以禁止浏览器缓存的方法,包括HTML、ASP及PHP等,确保用户每次都能获取到最新的网页内容。
7606

被折叠的 条评论
为什么被折叠?



