<!-- GET /TEST/HELLO.HTML HTTP/1.1 --请求行(发送的get请求,请求的资源/TEST/HELLO.HTML) --消息头 Accept: */* (表示客户端扣接收任何数据类型) Referer: http://localhost:80/test/abc.html (表示我是从哪里来的) Accept-Language: zh-cn (页面接收什么语言) User-Agent:Mozilla/4.0 (告诉服务器我的浏览器版本) Accept-Encoding:gzip, deflate (表示接收什么样的数据压缩格式) Host:localhost:80 (主机:80) Connection: Keep-Alive (表示不要立即断掉我们的请求) http响应 Location:http://www.baidu.com/index.php Server:apache Content-Encoding:gzip (内容编码支持 gzip压缩算法) Content-Length:80 (返回数据大小) Content-Language:zh-cn Content-Type:text/html; charset=GB2312 Last-Modified:Tue, 11 Jul 2000 18:23:51 GMT (表示浏览器请求的资源最新更新时间) Refresh:1; url=http://www.baidu.com (告诉浏览器间隔1秒,重定向到baidu) //下面两个是文件下载相关 Content-Disposition:attachment,filename=aaa.zip Transfer-Encoding:chuuked Set-Cookie:SS=Q0=5Lb_nQ;path=/search (讲 Cookie) //下面三个共同控制不缓存 Expires:-1 Cache-Control:no-cache Pragma:no-cache 案例: <?php //通过header来禁用缓存(ajax) header("Expires:-1"); header("Cache-Control:no_cache"); header("Pragma:no-cache"); echo 'hello! cache'; ?> -->