实际上我们发送缓存控制和expire头(通常缓存控制覆盖expire头)但我们得到了304响应。为什么导航器会进行此验证?通常导航器不应该创建304,因为存在缓存控件并且应该使用缓存。 (浏览器是firefox)
GET page
回应是:
304 Not Modified
Accept-Ranges: bytes
Age: 16059
Cache-Control: public, max-age=21600
Connection: keep-alive
Content-Encoding: gzip
Content-Language: fr
Content-Type: text/html; charset=utf-8
Date: Fri, 22 Apr 2016 08:30:37 GMT
Etag: "1461297779-11"
Expires: Sun, 19 Nov 1978 05:00:00 GMT
Last-Modified: Fri, 22 Apr 2016 04:02:59 GMT
Server: Apache
Vary: Cookie,Accept-Encoding
Via: 1.1 varnish
X-BeResp-ttl: 21600.000
X-Country-Code: YT
X-Drupal-Cache: MISS
X-Forwarded-Region: 0
X-Varnish: 386264387 386223490
X-Varnish-Cache: HIT
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3
Connection: keep-alive
Host: www.domain.com
If-None-Match: "1461297779-11"
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0