[Zope] Image caching (was: Simple (I hope) question re: images)

Lennart Regebro lennart@regebro.nu
Tue, 29 Jan 2002 18:20:09 +0100


From: "Jeffrey Robinson" <Jeffrey.Robinson@MCICoach.com>
> In most of my documents I always have a <href base> within the <head>,
such
> as:
> <base href="http://manage.anecho.mb.ca/">
>
> In all events that I've seen the base href is prepended to any referenced
> link in the HTML document unless that link is preceded by http:// (I might
> be off on the mechanics, this is just an observation).

No thats quite true.

> Thus, if I have a link in my code, located anywhere on my server with a
base
> href like shown above and the tag reads <img src="images/picture.jpg">,
the
> browser pulls up http://manage.anecho.mb.ca/images/picture.jpg instead of
> looking for it relative to where the document came from.
>
> I wasn't certain that if having a base href then gives the browser a
> "canonical" address which it can use for caching; unlike the relative path
> problem that you mentioned.

Well, it does, but the base ref can be used for other uses too, inside zope.
I'm quite sure that it would be just as simpl to set the link to the image
with an absolute path instead, and actually having the base reference
pointing to the document. At least this has no secondary effects.