[Zope] Prevent image-reloading...

Michael Bernstein mbernstein@profitscape.net
Tue, 16 Feb 1999 09:11:19 -0800


Andy Smith wrote:

> <untested>
> 
> <!--#in "['a','b','c']"-->
>    <A HREF="pages/<!--#var sequence-item-->> <IMG SRC="images/<!--#var
> sequence-item-->"></A>
> <!--#/in-->
> 
> The urls that are generated are identical in each case.
> 
> What's funny is that today I've come across the exact *opposite* problem.
> I've got a gif that is being generated dynamically that should be being
> updated as the result of use input, but the cached version keep popping up.
> 
> If you know what makes one gif reload and another come back from the cache
> then I'm all ears!

Ok, It looks as though you are generating relative URL's for those
images and links. it is usually much safer to generate fully qualified
URL's. Lets say that you have this directory structure:

/
 /images
 /a
 /b
 /c

it is entirely possible to go to the folowing URL:

www.yourdomain.com/a/b/c/b/c/a/b/a/c/b/images/someimage.gif

and actually retrieve the image. Directories are subject to acquisition
just like Methods are, so beware of referring to sibling directories as
sub-directories when creating relative URL's. The browser (correctly)
sees most of these images as having distinct URL's, and so does not
retrieve them from the cache.

I hope this solves your problem...I'm not sure what to do about your
non-reloading image though.

Michael.