[mod_python] IE not using cached images

Geert Jansen geertj at boskant.nl
Thu Jan 16 19:18:19 EST 2003

On Wed, Jan 15, 2003 at 07:45:27PM -0500, Jason Morgan wrote:

Hello Jason,

> On Wed, Jan 15, 2003 at 10:55:57PM +0100, Geert Jansen wrote:
> >
> > I have seen this problem too. I did the following things:
> >
> > * Make sure an appropriate "Last-Modified" http header is sent.
> I'm sorry for my ignorance but how do I do this? Is this in addition to
> send_http_header() or do I modify the http header to be sent?

You can use request.headers_out to add http headers.

But ... are you serving images with mod_python or are you using Apache for
that? Only if you are using mod_python, you can change the something about
the http response. But it would not make much sense IMHO to use mod_python
for this because Apache does a good job at serving static content.

When I wrote my response I was under the impression that you were using
mod_python for serving images.

> > * If the image is dynamically generated, make sure that there is
> >   no query part in the URL, i.e. the part after '?'. I think MSIE
> >   reloads these URLs every time. You can still pass parameters by
> >   using path_info.
> This isn't an issue as all images are static.

Geert Jansen

More information about the Mod_python mailing list