3

I am trying to study the HTTP response headers in popular websites. The objective is that I can cross-check with my website and adapt good things.

I tried to find how Vary header looks in the response for https://webmasters.stackexchange.com.

Based on the Curl --head and wget -S commands, the vary header is this

Vary: Fastly-SSL

However, when I examined the response via Chrome's F12 (dev tools), the response was this

vary: Accept-Encoding,Fastly-SSL

Seems the server responds with different vary headers for different user-agents/request-headers. But why exactly this is done? Why not include Accept-Encoding for all requests? Is there some optimization which I am missing?

1
  • A late comment, but since I'm troubleshooting this at work, I've noticed there is some waf rule that distinguishes users and responds with the vary header. So far I'm speculating that it's because they want to serve browser users with gzip resources whereas curl response they ignore. Jun 21, 2023 at 2:44

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.