[Zope] Re: Accelerating images without proxy

Oliver Bleutgen myzope@gmx.net
Wed, 23 Apr 2003 18:57:36 +0200


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())

;)

cheers,
oliver