AnotherAndrew Posted December 5, 2012 Share Posted December 5, 2012 I recently followed the advice from this page about browser caching and it appears to make one of my PW sites load faster. I'm curious as if this is already done in PW and if not, why it is not being implemented in the core. Thoughts? Link to comment Share on other sites More sharing options...
Marty Walker Posted December 5, 2012 Share Posted December 5, 2012 I add something similar to the bottom of all my PW installs which just leaves some low priority items when I run Google Page Speed. Link to comment Share on other sites More sharing options...
teppo Posted December 5, 2012 Share Posted December 5, 2012 The obvious problem with this approach is that you need to understand how caching works and what results it can have; ie. after adding these headers some users won't see new versions of changed files until a year later, which could result in quite a few strange situations. Of course you could say that your files never change, which may or may not be true (or if they do, all related filenames also change.) For me, at least, it just doesn't work that way. That's also why I don't think something like this should be enabled by default -- although I do agree that PW could perhaps provide an easy mechanism to set something like this up Here's another (rather good) article about expires headers by Christian Johansen. Highly recommended, if you're going to play around with those. 2 Link to comment Share on other sites More sharing options...
ryan Posted December 5, 2012 Share Posted December 5, 2012 Andrew I think you did the right thing by leaning about and implementing this the way you did. It's the sort of thing that really belongs with the site, server and developer rather than the CMS. ProcessWire doesn't make assumptions about where and how you are using it (or if you are even using it for http), so logically we probably shouldn't make assumptions about expires headers apache should send for static files. Though I can see potentially adding some options for setting this stuff with PW-managed output. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now