[Zope] Re: Accelerating images without proxy

Charlie Reiman creiman@kefta.com
Tue, 22 Apr 2003 16:16:50 -0700


> -----Original Message-----
> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Marc
> Burgauer
> Sent: Tuesday, April 22, 2003 3:44 PM
> To: zope@zope.org
> Subject: [Zope] Re: Accelerating images without proxy
>
>
> > Images delivered by zope are quite extensively cached on the browser
> > side per default, even without configuring something in zope.
> > I.e. zope sends appropriate "not modified" headers if it gets the right
> > request from the browser (which nearly all browsers do). You can see
> > this when grepping the logs for "304", or using a log analyzer. I just
> > checked on two sites of us, and on one, which has many different images,
> > I get 10% of all responses to be "304", while on the other, whose images
> > consist mainly of navigation buttons, I get 50% of all images cached.
> > This was btw. a big problem for us using localizer, because when
> > switching languages because the images wouldn't change.
> >
> > Since sending the 304 shouldn't be expensive, I doubt it will help much
> > for the speed of the site, but esp. not if it is network I/O bound.
> >
> > One thing which is important is to link the navigation images with their
> > absolute url, not using acquisition, so that the browser will be able to
> > see that the images are identical.
>
> I checked the logs and then some HTML. We did tell the web designers
> (customer's choice of design agency) to reference all images with absolute
> url (well, always start with the slash, e.g "/images/navigation/home.gif",
> but they didn't (so they are: "images/navigation/home.gif"). And there are
> hardly any 304 codes in the log.
>
> Would in this case an  Accelerated HTTP Cache Manager help?

Yes, it will. Try testing your engine with a cacheability tester:

http://www.mnot.net/cacheability/

In my experience, Zope was actually pretty lousy about setting cache headers
until I added the AHCM. This was made more complicated by the addition of
the apache proxy in front of zope.

Beware that once you get the AHCM added and working, uploading images in
zope can be disconcerting. If upload a new image into an existing object,
the preview will still show the old image until you force a reload. It's
harmless but strange.