[klutz]Patch to allow caching of Klutz images
Jon Knepher
jbk at wild-e.com
Tue Dec 17 21:45:10 PST 2002
> ----- Message from marcus@riboflavin.net ---------
> First of all, please keep comics submissions seperate from patches to
> the code. However, the comic has been added.
Sorry 'bout that. Didn't mean to include that...
> I've added code that should hopefully do what you want. I didn't really
> see a reason to update lib/Horde.php or use anything besides selfUrl.
> Unless you can give me a better reason, I plan to leave it as is.
When using 'MSIE [0-9.]+' (in my testing IE6.0), Horde::selfURL() adds a ?
nocache=uniqid(rand()) to work around a cache_same_url quirk. In this case,
an idempotent fetching of image that will have a static reply for a given
query, the bug does not need to be worked around. This quirk workaround
prevents the reply from ever being reused, even if it is cached. This also
prevents headend caches from reusing the the script output, even though it
should otherwise be reusable and public.
Either adding a parameter to selfURL to selectively ignore the quirk, or using
Horde::url to create the link allows the urls to be cachable and reusable. I
think adding the parameter to selfURL is a good idea as it will allow future
code to be easier to make cachable, if the target is idempotent and static.
OTOH, simply using Horde:url($_SERVER['PHP_SELF']) accomplishes the same result
at this time, as there is no cache_same_url workaround there.
Thanks.
Jon
More information about the klutz
mailing list