[Zope] Going Back

Terry Hancock hancock@anansispaceworks.com
Tue, 13 May 2003 10:19:32 -0700


On Tuesday 13 May 2003 05:08 am, Greg & Janet LINDSTROM 
wrote:
> What, if any, resources are available in Zope (2.6)
> for me to use to construct "back" buttons/links.  Is
> the page I came from stored anywhere, or can I
> access it?  Is there such a beast as a "back" input
> type (similar to "submit" or "reset")?  If not, how can
> I set up a "back"  button/link?

It is fundamentally the browser's business to know where
it's been, and your server is not supposed to know about
it (i.e. that's a privacy issue).  So, the general solution 
MUST be in the client code you send (therefore Javascript
in which case it's a fairly routine matter (find a 
javascript reference for examples).

The one thing you typically can get on the server side is
HTTP_REFERER, which is the page that requested your page.
This is often the page that linked to it, and is therefore
often synonymous with "back".  Other uses include references
from a main page to an embedded resources -- which
happens most often with "img" tags.

There are many situations in which no HTTP_REFERER value
is defined, however (I wish I knew what they all are, 
because I'm trying to use it for "referral blocking" 
images, myself).  For example, it appears that references
from your own site generally don't generate it.  (??)  It
also seems probable that it depends on cooperation
from the browser (also true of javascript, of course).

HTH,
Terry

--
Terry Hancock ( hancock at anansispaceworks.com )
Anansi Spaceworks  http://www.anansispaceworks.com