php header 函数详解_PHP教程
程序员文章站
2022-06-16 10:58:47
...
网页的缓存是由 HTTP消息头中的“Cache-control”来控制的,常见的取值有private、no-cache、-age、must-1-cache、must---control: -age=52---3-revalidate、--4-control值为“no-: Fri, 31 Dec 1999 16:00:00= no-=no-= -1-1.1服务器指定 CacheControl = no-1.0 服务器不能使用 Cache-1.0 服务器,IE使用Pragma:no-:
则 Internet Explorer不会缓存此响应。注意:Pragma:no-cache 仅当在安全连接中使用时才防止缓存,如果在非安全页中使用,处理方式与 Expires:---
(“HTTP/1.1 404(“HTTP/1.1 404
(“Location: http:
(“HTTP/1.1 302(“Location: http:
(“Content-type: text/plain’);
(‘Content-Disposition: attachment; filename=”weizhifeng.(‘weizhifeng./1.1('HTTP/1.1 200 OK'
('HTTP/1.1 404 Not Found'
('HTTP/1.1 301 Moved Permanently');
('Location: http://www.example.org/'
('Refresh: 10; url=http://www.example.org/''You will be redirected in 10 seconds'('Content-Transfer-Encoding: binary'
('example.zip'
('Cache-Control: no-cache, no-store, max-age=0, must-revalidate'('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
('Pragma: no-cache'
('Content-Type: text/html; charset=iso-8859-1'('Content-Type: text/html; charset=utf-8'('Content-Type: text/plain');
('Content-Type: image/jpeg');
('Content-Type: application/zip');
('Content-Type: application/pdf');
('Content-Type: audio/mpeg');
('Content-Type: application/x-shockwave-flash');
('HTTP/1.1 401 Unauthorized'('WWW-Authenticate: Basic realm="Top Secret"''Text that will be displayed if the user hits cancel or ''enters wrong login data'?>
下一篇: 正确解决MySQL中文乱码的实操