[mod_python] Detecting Back Button Usage

Richard Lewis richardlewis at fastmail.co.uk
Wed Mar 21 09:12:33 EST 2007

I've got a web application I'm working on with mod_python and a Java applet 
and it doesn't respond well to back button hits. One thing I thought of 
checking was the referrer. I haven't looked into it yet, but I notice its 
included in the Apache log. I guess there could be a header available to 
mod_python. Then you could check the referrer when you get a hit and see if 
its come from one of your own dynamic pages. Or something.


On Wednesday 21 March 2007 11:38, Kenneth Loafman wrote:
> Clodoaldo wrote:
> > I tried this and it worked in Firefox 1.5:
> >
> > <html>
> > <body>
> > <form method="get" action="">
> > <input type="image" name="my_image" src="ado_net_costas.png">
> > <input type="hidden" name="x" value="99.9">
> > <input type="hidden" name="y" value="33.3">
> > </form>
> > </body>
> > </html>
> >
> > When I click the image this URL is sent:
> > http://teste.s0/python/imagemap.html?my_image.x=293&my_image.y=222&x=99.9
> >&y=33.3
> This works perfectly for what I need.  The other form using the
> <img...ismap> tag would not allow me to get the args with mod_python's
> req.form.get() function, they had to be parsed internally.  Doing this
> and adding a couple of additional vars will allow the graph to be used
> in a bookmark, or served independently of the application.
> Thanks for all the help, and the patience!
> ...Ken
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python

Richard Lewis
JID: ironchicken at jabber.earth.li

More information about the Mod_python mailing list