Re: [Zope-dev] no reload of image in management interface of python product
[EMAIL PROTECTED] writes: > > > ... modified image not displayed by browser ... > Dieter Maurer replied: > >The browser has the image happily in its cache. > >You need a "SHIFT" + "RELOAD" > thanks - but isn't there another method - so that the user doesn't have > to reload the page manualy everytime ? Usually, caching is very good for performance. Occasionally, you do not like it. Your options: * you can configure the browser how often it should validate images (never, once per session, for every request). If you chose "for every request", the browser will always ask the server to send the image, if it is newer than the cached image. * you can tell your image (or all of your images) to add cache control headers. You can use the "precondition" of Zope images for this. HTTP1.1 defines quite comprehensive cache control directives. The problem: there are many not-HTTP1.1 compliant agents (browsers, caches) around. Vanilla HTTP1.0 does not provide for cache control. Nevertheless, most HTTP processors understand the "Expires" header. Thus, the best way is probably to use the "Expires". Note, that you must use this generally. It will not help, when you set the header *AFTER* you changed the image. It needs to be set, when the browser receives the image. Dieter ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] no reload of image in management interface of python product
Dieter Maurer wrote: >[EMAIL PROTECTED] writes: > > i have a python product with an image as a property > > now i display the image in the management screen, but when i change the > > image via the management interface the browser does no refresh of the image > > > > is set the mod time like this: > > > > self.doc_icon.lmt=time.time() > > self.doc_icon.lmh=rfc1123_date(self.doc_icon.lmt) > > > > doc_icon is a ImageFile > > > > so the date changes but the browser doesn't update this >The browser has the image happily in its cache. >You need a "SHIFT" + " > > >Dieter > >___ >Zope-Dev maillist - [EMAIL PROTECTED] >http://lists.zope.org/mailman/listinfo/zope-dev >** No cross posts or HTML encoding! ** >(Related lists - > http://lists.zope.org/mailman/listinfo/zope-announce > http://lists.zope.org/mailman/listinfo/zope ) > thanks - but isn't there another method - so that the user doesn't have to reload the page manualy everytime ? - bernd ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] no reload of image in management interface of python product
[EMAIL PROTECTED] writes: > i have a python product with an image as a property > now i display the image in the management screen, but when i change the > image via the management interface the browser does no refresh of the image > > is set the mod time like this: > > self.doc_icon.lmt=time.time() > self.doc_icon.lmh=rfc1123_date(self.doc_icon.lmt) > > doc_icon is a ImageFile > > so the date changes but the browser doesn't update this The browser has the image happily in its cache. You need a "SHIFT" + " Dieter ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] no reload of image in management interface of python product
hello all i have a python product with an image as a property now i display the image in the management screen, but when i change the image via the management interface the browser does no refresh of the image is set the mod time like this: self.doc_icon.lmt=time.time() self.doc_icon.lmh=rfc1123_date(self.doc_icon.lmt) doc_icon is a ImageFile so the date changes but the browser doesn't update this do i have to add something in the http header of the management page or so please help -- bernd ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )