Jump to content

Browser caching


AnotherAndrew
 Share

Recommended Posts

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.

  • Like 2
Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...