How could I go about changing the Expires headers for ImageGen? Currently it defaults to the date the image was created. That is generally in the past.
What I'd like is for it to auto expire in at least 48 hours from the current Date/Time. Is that possible?
I don't think it is a 'bug' so much as a 'lack of a feature' :)
ImageGen v2 does server-side caching. With the etags and expires headers you'll get a 304 response rather than sending the file again. This does, however, involve a round-trip request even though it is very small and fast.
Improvements to allow browser-side caching as well are coming in
ImageGen Professional v3. You will also be able to set the expires
timeout in any of your imagegen.config classes.
ImageGen 2.5 is now released and it supports client-side caching in ImageGen Professional. See the Reference Manual for details, but the short answer is to use Classes in ImageGen and set the <CachingTimeSpan> element to a the number of seconds you'd like images created with that &class= to be cached on the visitor's browser without even making a request back to the server to look for a newer version of the file.
ImageGen Basic does not have client-side caching, though ETags and server-side caching (with 304 responses) are standard.
Expires headers in the past
How could I go about changing the Expires headers for ImageGen? Currently it defaults to the date the image was created. That is generally in the past.
What I'd like is for it to auto expire in at least 48 hours from the current Date/Time. Is that possible?
Thanks,
Jason
I'm using ImageGen a lot, but my images have these headers at this moment, which also include an Expires header in the future:
Expires Thu, 25 Mar 2010 14:02:52 GMT
Last-Modified Thu, 25 Mar 2010 14:02:52 GMT
Date Wed, 12 May 2010 20:54:08 GMT
Ah dammit! Sorry, I read 'May' instead of 'Mar'... (where is the edit/delete option!!! :-( )
This is a serious flaw... Hopefully Douglas will fix it :-) (couldn't find this option in the documentation)
Yea, I had the same reaction when I first saw it :)
Douglas...Help!
I don't think it is a 'bug' so much as a 'lack of a feature' :)
ImageGen v2 does server-side caching. With the etags and expires headers you'll get a 304 response rather than sending the file again. This does, however, involve a round-trip request even though it is very small and fast.
Improvements to allow browser-side caching as well are coming in ImageGen Professional v3. You will also be able to set the expires timeout in any of your imagegen.config classes.
cheers,
doug.
Ah, OK.
I'll be waiting for the new version!
Thanks Douglas!
Any chance this was or could be fixed in the new 2.5 version?
It really helps for performance!
Hi, Jason,
ImageGen 2.5 is now released and it supports client-side caching in ImageGen Professional. See the Reference Manual for details, but the short answer is to use Classes in ImageGen and set the <CachingTimeSpan> element to a the number of seconds you'd like images created with that &class= to be cached on the visitor's browser without even making a request back to the server to look for a newer version of the file.
ImageGen Basic does not have client-side caching, though ETags and server-side caching (with 304 responses) are standard.
cheers,
doug.
Excellent. Thanks Doug!
-Jason
is working on a reply...