28 Apr
2004
28 Apr
'04
5:54 p.m.
I'm trying to make a quick and dirty random image product. It is a zClass based off of OFS::Folder. The index_html method is as follows: context.REQUEST.RESPONSE.setHeader( 'Cache-Control' ,'no-cache' ) context.REQUEST.RESPONSE.setHeader( 'Pragma' ,'no-cache' ) image_set = [] images = context.objectValues('Image') for each in images: image_set.append(each) return_image = image_set[random.choice(range(0,len(image_set)))] return return_image.index_html(context.REQUEST,context.REQUEST.RESPONSE) This works fine as long as one shift-reloads the image. Otherwise it does not change the image. Obviously my attempts to defeat the browser cache are not succeeding. Can anyone tell me why?