[Zope] Re: Accelerating images without proxy

Charlie Reiman creiman@kefta.com
Wed, 23 Apr 2003 11:09:04 -0700


> -----Original Message-----
> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of
> Oliver Bleutgen
> Sent: Wednesday, April 23, 2003 9:58 AM
> To: zope@zope.org
> Subject: Re: [Zope] Re: Accelerating images without proxy
>
>
> Charlie Reiman wrote:
>
> >
> > I guess I misread the posting. Generally in zope you don't use
> direct URL at
> > all to refer to an image. You should instead get the object and
> ask it what
> > it's URL is.
> >
> > If they must place image URLs in raw text, then don't use Zope for your
> > images. You aren't gaining anything. Use an apache front end,
> proxy through
> > part for Zope (using VHM) and part for the images. Stick the images on
> > Apache and be done with it.
> >
> > To be really cheeky, a 302 response should be sufficient to
> tell the browser
> > that /spam/images/navigation/home.gif is the same image as
> > /images/navigation/home.gif. But that's not what your looking for.
>
> Well, but you are on to a new product here, ZImageDemoronized:
>
> class ZImageDemoronized(Image):
>    def index_html(self,REQUEST):
>      if REQUEST['URL0'] != self.absolute_url():
>        return REQUEST.RESPONSE.redirect(self.absolute_url())

I suppose you could make a case that this should be optional behavior: Sort
of a "canonical access only"  mode. It really only make sense for static
content where acquisition isn't relevent. But it would still be an
interesting option and would help with caching.

I'll thow it in my bag-o-tricks.