Support » Plugin: CAOS | Host Google Analytics Locally » Specify a ‘Vary: Accept-Encoding’ header?

  • Resolved W

    (@filmpuls)


    Heja Daan,

    the “dareboost.com”-web-performance testing tool gives me a red flag (serious performance issue), saying “Specify a ‘Vary: Accept-Encoding’ header” for:

    //wordpress/wp-content/cache/caos-analytics/analytics.js

    The ‘Vary: Accept-Encoding’ header allows to cache two versions of the resource on proxies: one compressed, and one uncompressed. So, the clients who cannot properly decompress the files are able to access your page via a proxy, using the uncompressed version. The other users will get the compressed version.

    can you advice?
    best regards, Kristian

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Daan van den Bergh

    (@daanvandenbergh)

    Hi @filmpuls!

    Your server uses Nginx? It’s very possible that its only adding a accept-encoding header to files with a minimum size, you can set this in your Nginx configuration with gzip_min_length. You can read more here: https://docs.nginx.com/nginx/admin-guide/web-server/compression/

    If you don’t have access to your Nginx configuration, contact your hosting provider.

    W

    (@filmpuls)

    Heja Daan, thanks for the answer. but no, the site runs on Apache/2.4

    Plugin Author Daan van den Bergh

    (@daanvandenbergh)

    Hi,

    Is it still giving the same error? Because Pingdom is showing it just fine, it’s even tagged with the x-cache: HIT value which means that the file was loaded from server level cache. Check it out: https://tools.pingdom.com/#5b22ef18b4800000

    W

    (@filmpuls)

    Heja, yes – error is still showing up – seems to be a problem of the test tool, I guess. Will check w/ dareboost and let you know. thx for the great support!

    Plugin Author Daan van den Bergh

    (@daanvandenbergh)

    Very curious!

    No problem, @filmpuls!

    W

    (@filmpuls)

    Heja Daan, here comes the answer from dareboost.com´s Boris Schapira, Customer Success Manager; leaves me kind of confused

    Hi,
    Thanks for getting in touch regarding this analysis.
    Let’s imagine that someone from a big corporation visits your website. To reduce bandwidth consumption, big corporations often deploy a cache proxy at the entry point of their network. That someone has an old browser, not supporting compressed content or only supporting gzip, and requests the resource. The uncompressed or gzipped resource will be cached on the company proxy cache. Now, if another browser, that supports brotli, requests the resource, the cached resource (uncompressed or gzipped) will be served. The “Vary: Accept-Encoding” header is an instruction for proxies (like this company proxy), telling them to cache several version of a same resource as serve the resource accordingly.

    And as you can see your Pingdom analysis, the header is NOT responded (the link is: wp-content/cache/caos-analytics/analytics.js)

    Have a great day and a wonderful week,

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Specify a ‘Vary: Accept-Encoding’ header?’ is closed to new replies.