On Apr 27, 2009, at 10:11 PM, Owen Winkler wrote: > If the CSS is served properly, it will come with headers that set a > long > client-side cache life. This is a benefit because it will avoid the > client from continuously requesting updates of the CSS from the > server. > The downside is that if the CSS is actually updated on the server, > there's no way the client would know, since its cache settings tell it > not to request updates. > > The remedy is to add a simple querystring with a version number. The > querystring is ignored by Apache, but the browser sees it as a new > URL, > which circumvents its previous cache settings for that file. The same > file is served, but by adding the querystring, the client behaves as > though the cache must be refreshed. > > Upon receiving the new file, it is once again cached, hopefully using > the same settings as before, and will subsequently not be requested > again until that querystring number is updated. > > This is a fairly standard method for implementing a solid client-side > caching strategy, while still enabling server-side changes to > propagate > to the client.
Ah right, I should have thought of that. It definitely makes sense to me. Would we have to store the "current" querystring in the database? >> In terms of HiEngine, I wonder if we could actually run both PHP and >> HiEngine at once on the generation. I'd see it working like this: >> 1) We open a buffer to catch the output >> 2) The stylesheet is included >> 3) We run the resultant css through the HiEngine >> 4) We output/cache the CSS >> >> Since most requests will be served from the cache, this shouldn't be >> too much of a hassle. > > I'm not sure what this is meant to accomplish, but it seems > unnecessary. There were objections to forcing people to use HiEngine if they would prefer PHP. Personally, I see a lot of benefit in being able to use more complex PHP (if need be) within stylesheets, and it doesn't seem to complicate the process any of themers. --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to habari-dev@googlegroups.com To unsubscribe from this group, send email to habari-dev-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/habari-dev -~----------~----~----~----~------~----~------~--~---