Article From:

Cache-Control:Specifies how the cache handles content. Varnish cares about the max-age parameter and uses it to calculate the TTL of the object.
Age:varnishA Age header information is added to indicate how long the object has been held in Varnish. You can pass the varnishlog
Pragma:A HTTP 1 server may send “Pragma:no-cache”. Varnish ignores this header information. In VCL, you
can easily increase the support for this header information in vcl_fetch:if (beresp.http.Pragma ~” nocache “) {pass;}
Authorization:varnishWhen you see the authorization header information, it will pass the request. You can also unset this header information
Cookies:varnishIt does not cache objects with Set-Cookie header information from the back end. Also, if the client sends one
Cookie header information”, varnish will bypass the cache and send it directly to the backend.
Vary: VaryThe header information is sent by the web server, representing what caused the change of the HTTP object. It can be done through Accept-Encoding.
When the server sends out “Vary:Accept-Encoding”, it tells varnish.Need to be for each
Different versions of the Accept-Encoding cache are different versions of the client.。So, if the client only receives the gzip code. Varnish will not be
ifAccept-EncodingThe field contains many different encoding, such as browser sending:
Accept-Encodign: gzip, deflate” sends another way:
Accept-Encoding: deflate”, gzip because Accept-Encoding header information is different, varnish will preserve two kinds of differences.
request page.Specification of Accept-Encoding header information will ensure that your requests for different caches are as few as possible.




Link of this Article: Varnish HTTP head

Leave a Reply

Your email address will not be published. Required fields are marked *