Title: Leverage browser caching warning
Last modified: May 11, 2019

---

# Leverage browser caching warning

 *  Resolved [komitaltrade](https://wordpress.org/support/users/komitaltrade/)
 * (@komitaltrade)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/leverage-browser-caching-warning/)
 * I still have Leverage browser caching warning (GTmetrix) for [http://ecualadrillo.com/wp-content/cache/caos-analytics/analytics.js](http://ecualadrillo.com/wp-content/cache/caos-analytics/analytics.js)
 * Why?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fleverage-browser-caching-warning%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 10 replies - 1 through 10 (of 10 total)

 *  [hatschiii](https://wordpress.org/support/users/hatschiii/)
 * (@hatschiii)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/leverage-browser-caching-warning/#post-11522003)
 * 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 [Daan van den Bergh](https://wordpress.org/support/users/daanvandenbergh/)
 * (@daanvandenbergh)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/leverage-browser-caching-warning/#post-11522194)
 * 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.
 *  [hatschiii](https://wordpress.org/support/users/hatschiii/)
 * (@hatschiii)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/leverage-browser-caching-warning/#post-11522295)
 * Normal expire header are set in .htaccess, not on server level
 *  Plugin Author [Daan van den Bergh](https://wordpress.org/support/users/daanvandenbergh/)
 * (@daanvandenbergh)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/leverage-browser-caching-warning/#post-11522311)
 * 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](https://wordpress.org/support/users/komitaltrade/)
 * (@komitaltrade)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/leverage-browser-caching-warning/#post-11522715)
 * > 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 [Daan van den Bergh](https://wordpress.org/support/users/daanvandenbergh/)
 * (@daanvandenbergh)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/leverage-browser-caching-warning/#post-11522726)
 * [@komitaltrade](https://wordpress.org/support/users/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 [Daan van den Bergh](https://wordpress.org/support/users/daanvandenbergh/)
 * (@daanvandenbergh)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/leverage-browser-caching-warning/#post-11522742)
 * 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](https://wordpress.org/support/users/komitaltrade/)
 * (@komitaltrade)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/leverage-browser-caching-warning/#post-11523153)
 * 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](https://wordpress.org/support/users/komitaltrade/)
 * (@komitaltrade)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/leverage-browser-caching-warning/#post-11523156)
 * BTW – Is it particular reason to not use minified version of analytics.js (as
   it is already striped locally)?
 *  Plugin Author [Daan van den Bergh](https://wordpress.org/support/users/daanvandenbergh/)
 * (@daanvandenbergh)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/leverage-browser-caching-warning/#post-11523439)
 * Thanks for your help, [@komitaltrade](https://wordpress.org/support/users/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.

 * ![](https://ps.w.org/host-analyticsjs-local/assets/icon-256x256.png?rev=3307068)
 * [CAOS | Host Google Analytics Locally](https://wordpress.org/plugins/host-analyticsjs-local/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/host-analyticsjs-local/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/host-analyticsjs-local/)
 * [Active Topics](https://wordpress.org/support/plugin/host-analyticsjs-local/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/host-analyticsjs-local/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/host-analyticsjs-local/reviews/)

## Tags

 * [caching](https://wordpress.org/support/topic-tag/caching/)

 * 10 replies
 * 3 participants
 * Last reply from: [Daan van den Bergh](https://wordpress.org/support/users/daanvandenbergh/)
 * Last activity: [7 years, 1 month ago](https://wordpress.org/support/topic/leverage-browser-caching-warning/#post-11523439)
 * Status: resolved