Mobile app version of vmapp.org
Login or Join
Smith883

: If I only serve gzipped version of my content, should I add the vary accept encoding header? I just moved a static site from a VPS to Amazon S3. I have decided to serve only gzipped version

@Smith883

Posted in: #AmazonS3 #Gzip #HttpHeaders #StaticContent

I just moved a static site from a VPS to Amazon S3. I have decided to serve only gzipped version of my pages, since S3 is not a webserver I can't have logic based on headers. I also use Cloudfront as CDN.

I was testing my page with gtmetrix.com/ and got a bad note because I don't add the vary accept encoding header. So I checked what this is about and as far as I understand it makes sense when we serve both compressed and uncompressed versions.

So I'd like you to help me clarify this. Should I add it? Thanks :)

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Smith883

1 Comments

Sorted by latest first Latest Oldest Best

 

@Voss4911412

I have decided to serve only gzipped version of my pages


If you're only serving files that you've compressed using gzip, then using Vary: Accept-Encoding will be of no benefit since there won't be uncompressed copies of the files to serve to clients that don't send Accept-Encoding: gzip in the HTTP request. Most clients these days do send this, so you should be fine.

Online website performance tests don't know that you're only serving compressed files, and they're also not fool-proof either. You might note for example that the service you used lists these under a column labeled RECOMMENDATION, so it's wise to follow-up any suggestions like this with some fact-finding (like you did) before becoming too concerned or trying to implement them.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme