- From: Philipp Serafin <phil127@gmail.com>
- Date: Wed, 22 Sep 2010 23:10:58 +0200
On 21.09.2010 21:01, Aryeh Gregor wrote: > On Mon, Sep 20, 2010 at 2:25 AM, Julian Reschke <julian.reschke at gmx.de> wrote: >> Resources that should be cached (stylesheets, images) but change at >> unexpected times are indeed a problem. >> >> A well understood approach is to push some kind of version indicator into >> the URI (such as query parameter). > This is usually workable in my experience, I agree, and I'd be > interested to know of use-cases where it's not close to optimal. i One disadvantage I think the version-in-URI approach has is that it's completely transparent to the HTTP caching system. In particular, it doesn't give caches any information about when a resource is expired. This isn't really an issue if you really know for sure that your resource in question only changes very rarely. However if you have a resource that you would like to cache but where you cannot reliably predict how fast it will change, this might become a problem. If your resource changes too fast, this will clog up caches with dozens of old versions which cannot be deleted because of their long-lived expiry header. (Concrete example: Consider the avatar images of an internet message board. Most users only set their avatar once when they register, though a few may change them based on mood, holidays, etc.) Regards, Philipp Serafin
Received on Wednesday, 22 September 2010 14:10:58 UTC