[Zope] Random Images: How to defeat the cache

Edward Pollard pollej at uleth.ca
Wed Apr 28 18:35:12 EDT 2004


On Apr 28, 2004, at 2:53 PM, Mark Gibson wrote:

> Edward Pollard wrote:
>> On Apr 28, 2004, at 12:22 PM, Small Business Services wrote:
>>>
>>> Try adding setting the expiry time:
>>>
>>> <meta http-equiv="expires" content="Sat, 01 Jan 2001 00:00:00 GMT">
>>>
>> Of course, I'm dealing with images, not HTML content, so META tags 
>> are right out.
>> But I added this as a header (using the same mechanism as the 
>> previous example) with no luck.
>
> I've had some luck with this combination:
>
>     RESPONSE.setHeader('Expires', 'Fri, 05 Jul 2002, 05:00:00 GMT' );
>     RESPONSE.setHeader('Cache-Control', 'no-store');
>     RESPONSE.setHeader('Pragma', 'no-cache');
>

No improvement.

It is noted that when I hold shift-reload, I keep getting different 
images (as discussed previously).
When I don't hold shift, I get the same image over and over. However, 
it is ALWAYS the first image in the list (alphabetically).

Weird. Maybe my code has something wrong with it.

---
Edward J. Pollard, B.Sc
Webmaster, UnivERS




More information about the Zope mailing list