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

关于http请求的缓存不禁用缓存的比较,第1张

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

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/2088993.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-07-22
下一篇 2022-07-22

发表评论

登录后才能评论

评论列表(0条)

保存