关于http请求的缓存不禁用缓存的比较

http://www.baidu.com/cache/hps/js/hps-1.5.js
 
GET /cache/hps/js/hps-1.5.js HTTP/1.1
Host: www.baidu.com
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:12.0) Gecko/20100101 Firefox/12.0
Accept: */*
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Referer: http://www.baidu.com/
Cookie: BAIDUID=A5C1CFA391F011A6A4AC19A31DD04846:FG=1
 
HTTP/1.1 200 OK
Date: Tue, 01 May 2012 05:04:17 GMT
Server: Apache
Last-Modified: Wed, 18 Apr 2012 08:27:23 GMT
Etag: "6e7-4bdefd31450c0"
Accept-Ranges: bytes
Cache-Control: max-age=315360000
Expires: Fri, 29 Apr 2022 05:04:17 GMT
Vary: Accept-Encoding,User-Agent
Content-Encoding: gzip
Content-Length: 861
Connection: Keep-Alive
Content-Type: application/javascript

 

 

上面是不缓存,下面是缓存,

看来web developer的disable cache的功能是通过过滤header来实现的

 

 

http://s1.bdstatic.com/r/www/cache/hps/js/hps-1.5.js
 
GET /r/www/cache/hps/js/hps-1.5.js HTTP/1.1
Host: s1.bdstatic.com
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:12.0) Gecko/20100101 Firefox/12.0
Accept: */*
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Referer: http://www.baidu.com/
If-Modified-Since: Wed, 18 Apr 2012 08:27:23 GMT
If-None-Match: "6e7-4bdefd31450c0"
Cache-Control: max-age=0
 
HTTP/1.1 304 Not Modified
Server: JSP/1.0.18
Date: Tue, 01 May 2012 05:02:17 GMT
Connection: keep-alive
Last-Modified: Wed, 18 Apr 2012 08:27:23 GMT
Etag: "6e7-4bdefd31450c0"
Cache-Control: max-age=315360000
Expires: Sat, 16 Apr 2022 12:59:48 GMT

posted on 2012-05-01 13:11  lexus 阅读( ...) 评论( ...) 编辑 收藏

转载于:https://www.cnblogs.com/lexus/archive/2012/05/01/2477811.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值