Viewing 10 replies - 1 through 10 (of 10 total)
  • Have the same issue… Think this i because no expire header for analytics.js is set. Unfortunatly the plugin does not have an option for this, and I don’t know how to enable this for analytics.js ??

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    An expire header is set on server level. There’s nothing I can do about it. Try tweaking your server’s settings. Perhaps the analytics.js is too small (Nginx has a setting which only adds headers to files larger than a certain size) or is saved in a directory excluded by your Apache or Nginx configuration.

    Normal expire header are set in .htaccess, not on server level

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Okay, it’s a matter of semantics, I guess. ??

    .htaccess is an Apache configuration file. I’d call that server level. But I guess, since it’s located in the web root, you could call it something else. ??

    Anyway, it’s something that I shouldn’t attempt to influence with this plugin. Because I feel it’s beyond the scope of this plugin.

    Thread Starter komitaltrade

    (@komitaltrade)

    An expire header is set on server level. There’s nothing I can do about it. Try tweaking your server’s settings.

    I thought the same, as I’m using W3TC and somehow they don’t have default expiration in settings (or I’m not able to set it). I wanted to avoid manual editing, but I will probably do it now, as there is also issue of ice and with FB pixel (if I activate it). Thanks.

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    @komitaltrade,

    There are ways to edit .htaccess through PHP (from within a plugin). Many plugins do it, WP Fastest Cache is an example, W3TC does it too. From these plugins it’s expected, because it adds to the User Experience. But like I said, it’s far beyond the scope of this plugin.

    Another way to put it: I think many people will be negatively surprised once they see that CAOS (a plugin which downloads/updates your analytics.js and nothing else, basically) also edits the Apache/Nginx configuration.

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Although I’m not sure if I could edit Ngunx configuration from within PHP, since Nginx configuration is usually not located within the web root. Unlike Apache.

    Thread Starter komitaltrade

    (@komitaltrade)

    1) Leverage is solved by (you can use other expiration time)

    # BEGIN Expires Headers
    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault “access plus 7 days”
    </IfModule>
    # END Expires Headers

    2) Yes you can edit Nginx configuration (Google “leverage nginx”).

    Thread Starter komitaltrade

    (@komitaltrade)

    BTW – Is it particular reason to not use minified version of analytics.js (as it is already striped locally)?

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Thanks for your help, @komitaltrade

    I’m pretty sure I’m using the minified version. I’m using the same one Google uses in their snippet.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Leverage browser caching warning’ is closed to new replies.