[Zope] Browser Sticky Fingers
Anthony Baxter
Anthony Baxter <anthony@interlink.com.au>
Tue, 19 Oct 1999 09:16:24 +1000
>>> "Jeff Rush" wrote
> I'm pulling my hair out here over what is probably a simple HTTP issue.
> I have a Zope method that stuffs a new image into a Zope Image object,
> based on the content of the page where the method is called.
>
> The problem is that the image is not updated until I exit the browser,
> and then flush all of it's caches manually.
>
> I've turned off any proxy support, configured Netscape 4.x with the
[...]
> Am I missing something simple?
Yep. Browsers suck. They cache images regardless. The disgusting
hack is to always call your image with the current time in the URL -
eg. <img src="/your/image/method?dummy_ts=<dtml-var "ZopeTime().timeTime()">">
/your/image/method should feel entirely free to ignore dummy_ts.
This way the image has a different URL, and so the browser doesn't
use a cached one.
When you're producing on-the-fly live statistics as a graph, this
hideous misfeature is a complete pain in the clacker.
Anthony
--
Anthony Baxter <anthony@interlink.com.au>
It's never too late to have a happy childhood.