Title: Piwik JavaScript without far-future expiration date
Last modified: August 21, 2016

---

# Piwik JavaScript without far-future expiration date

 *  Resolved [GermanKiwi](https://wordpress.org/support/users/germankiwi/)
 * (@germankiwi)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/piwik-javascript-without-far-future-expiration-date/)
 * Hi braekling,
 * I’m using WP-Piwik with the option “Use js/index.php” on the Tracking tab.
 * I’m finding that when I test my site with YSlow (via [gtmetrix.com](http://gtmetrix.com)),
   it reports this issue:
 *     ```
       There is 1 static component without a far-future expiration date:
       http://piwik.mysite.com/js/
       ```
   
 * But if I change WP-Piwik to use the option “Default tracking”, which means it
   uses [http://piwik.mysite.com/piwik.js](http://piwik.mysite.com/piwik.js) then
   I don’t get this issue with YSlow anymore – this file is correctly cached.
 * So it seems that for some reason, the /js/ option doesn’t seem to like being 
   cached. Can you shed any light on how I can change this?
 * For the record, I have enabled caching in my .htaccess file like this:
 *     ```
       ExpiresActive on
         ExpiresByType text/html                 "access plus 1 hour"
         ExpiresByType application/javascript    "access plus 1 week"
       ```
   
 * (plus numerous other types too)
 * I don’t know whether the /js/index.php file would fall into the category of text/
   html or application/javascript, but either way, it should be cached according
   to the above settings, right?
 * Any ideas?
 * [http://wordpress.org/plugins/wp-piwik/](http://wordpress.org/plugins/wp-piwik/)

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

 *  Plugin Author [braekling](https://wordpress.org/support/users/braekling/)
 * (@braekling)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/piwik-javascript-without-far-future-expiration-date/#post-4535684)
 * It doesn’t expire in far-future, because it is a php file and no js file. You
   htaccess is configured to add a expiration date to HTML and JS files, but (for
   good reason!) not to PHP files.
 * But /js/index.php uses the if-modified-since header, so there it should be cacheable
   by a browser anyway. If this doesn’t work, you should ask the Piwik community:
   [http://forum.piwik.org](http://forum.piwik.org)
 *  Thread Starter [GermanKiwi](https://wordpress.org/support/users/germankiwi/)
 * (@germankiwi)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/piwik-javascript-without-far-future-expiration-date/#post-4535687)
 * I see. Thanks for the explanation!

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

The topic ‘Piwik JavaScript without far-future expiration date’ is closed to new
replies.

 * ![](https://ps.w.org/wp-piwik/assets/icon-256x256.png?rev=3529668)
 * [Connect Matomo - Analytics Dashboard for WordPress](https://wordpress.org/plugins/wp-piwik/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-piwik/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-piwik/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-piwik/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-piwik/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-piwik/reviews/)

## Tags

 * [cache](https://wordpress.org/support/topic-tag/cache/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [piwik](https://wordpress.org/support/topic-tag/piwik/)

 * 2 replies
 * 2 participants
 * Last reply from: [GermanKiwi](https://wordpress.org/support/users/germankiwi/)
 * Last activity: [12 years, 4 months ago](https://wordpress.org/support/topic/piwik-javascript-without-far-future-expiration-date/#post-4535687)
 * Status: resolved