Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #966538

    After I got an error on Pingdom stating ‘Specify a Vary: Accept-Encoding header’ on a number of files, I added the following to .htaccess:

    <IfModule mod_headers.c>
      <FilesMatch ".(js|css|xml|gz|html)$">
        Header append Vary: Accept-Encoding
      </FilesMatch>
    </IfModule>

    It works for all files that were giving errors before on Pingdom, except for the page itself. That’s the only one still giving an error:

    The following publicly cacheable, compressible resources should have a “Vary: Accept-Encoding” header:
    https://multispace.nl/

    And if I test another page on my website, the same occurs: only the main page gets the vary: accept-encoding error.

    Any idea how to fix this?

    Mark

    #967784

    I’ve asked my webhoster and he suggested to omit the <ifModule> part, so that it’s always active. Unfortunately the Vary: Accept-Encoding error on the page itself remains.

    Anyone else got an idea? If I understand correctly, this error means that browsers that are capable of handling gzip compression, might get feed the uncompressed version anyway, which would slow down the loading of the page.

    So to summarise: all the Accept-Encoding errors are gone, except for the main pages (home, contact, etc.)

    Thanks.

    Mark

    #967860

    I googled and tried and googled some more and….got it working now!

    Forget the code I put up earlier and replace it with this:

    <ifModule mod_headers.c>
      Header unset Vary
      Header set Vary "Accept-Encoding, X-HTTP-Method-Override, X-Forwarded-For, Remote-Address, X-Real-IP, X-Forwarded-Proto, X-Forwarded-Host, X-Forwarded-Port, X-Forwarded-Server"
    </ifModule>

    This sets the header for every file and request.

    Topic can be closed.

    Mark

    #967958

    Hi,

    Glad you figured it out Mark and thanks for sharing your solution! :)

    For your information, you can take a look at Enfold documentation here – http://kriesi.at/documentation/enfold/
    If you have any other questions or issues, feel free to start a new thread under Enfold sub forum and we will gladly try to help you :)

    Best regards,
    Yigit

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Vary: Accept-Encoding error only on pages’ is closed to new replies.