There is “No” particular area the code needs to be placed within your “.htaccess” file.
And do NOTE: I too still get the “The following publicly cacheable, compressible resources should have a “Vary: Accept-Encoding” header:” message!
It was the score that was improved… As I mentioned above – it improved my score to “A” (93)… (from what was a “D”) – If you’re trying to get to a score of 100%; you may have to look at what files (Most likely they’re JS files) are causing the low scores.
For instance, Google Maps & Twitter JS files seem to still show up for me. It may also include removing one or more Plugins… you may even need to remove some HTML.
Pingdom shows you the specific files you’ll need to deal with (by clicking the Down Arrow). Find what those files are linked to and then you’ll have to make the choice (As an example… do I want that Map or Twitter button or can I do without it on that page).
For me getting my score from a “D” to an “A” was good enough… I was not looking to get to 100%!
Is this your site: https://thegingeek.com/
Run in Pingdom:
The following publicly cacheable, compressible resources should have a “Vary: Accept-Encoding” header:
https://thegingeek.com/
https://thegingeek.com/sitespeed-js/36b7b49cbadc466b80f45d56d7417ce5.js
https://z-na.amazon-adsystem.com/widgets/onejs? … dInstanceId=06c4d9ae-9595-4e02-8c64-a69bae60f606
My guess is it would be the last one “https://z-na.amazon-adsystem.com/widgets/onejs?”
Search Google for “Specify a Vary: Accept-Encoding header https://z-na.amazon-adsystem.com/widgets/” and see what turns up. I found this on a quick search https://amzn.to/2H7qp9Y
-
This reply was modified 6 years, 9 months ago by ragtech.