最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
禁止页面缓存的几种方法
时间:2022-06-25 14:43:59 编辑:袖梨 来源:一聚教程网
今天在开发时碰到一种方法,就是客户要求页面不缓存,查了一下得出如下几种不让页面缓存的办法
html
只要加在头部就可以了.
asp教程做法
Response.Buffer = True
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "No-Cache"
php教程做法
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . 'GMT');
header('Cache-Control: no-cache, must-revalidate');
header('Pragma: no-cache');
?>
还有一种更简单的方法,就是大家ajax时用到的?mt=随便数据
相关文章
- 微博网页版快速访问-微博电脑版官方登录直达入口 02-15
- 樱花动漫下载最新版本-樱花动漫官方正版安装入口与使用教程 02-15
- 淘宝连续打卡免费领奖入口在哪-淘宝连续打卡免费领奖为啥没有 02-15
- 夸克浏览器2026官网登录入口-夸克浏览器在线打开官网 02-15
- 知乎网页版直达-知乎官网链接速递 02-15
- 二重螺旋充值入口在哪-二重螺旋官网月石晶胚充值通道 02-15