Opened 3 years ago

Closed 3 years ago

Last modified 7 weeks ago

#2406 closed Bug (fixed)

Empty Expires: headers causes proxy cache to not cache the request

Reported by: matt Owned by: matt
Priority: normal Milestone: 1.5 - Piwik 1.5
Component: UI - UX (AngularJS, twig, less) Keywords:
Cc: Sensitive: no


Since I have my current internet connection I have been VERY frustrated by the fact, that on the demo, none of the assets are cached and always return 200. What happens, is that my internet provider proxy cache didn't honor the cache headers.

After researching the cause is that the Expires: header is empty.

Setting the Expires: header in the far future (as advised by Yahoo best practises) fixes the issue and causes the proxy cache they use to finally cache our assets.

Setting expires in the far future, means that the file will not even be requested at all, so that the browser will only request in the far future.

However it should work nicely for us, because we use a buster in the assets URLs so that when the assets change, the <.. src='...'> URL is also changed (good call on this one anthon ;)

Change History (4)

comment:2 Changed 3 years ago by vipsoft (robocoder)

Should be ok in most cases. The only exception is the js/ proxy serving piwik.js which has no cache buster string.

comment:3 Changed 3 years ago by matt (mattab)

  • Resolution set to fixed
  • Status changed from new to closed

(In [4642]) Fixes #2406

comment:4 Changed 7 weeks ago by matt (mattab)

In c1703a107774db816b5a65717ee1d9de394cffa4:

cache /js/ for 10 days rather than none. Refs #2406
From forum feedback:,112741

Note: See TracTickets for help on using tickets.