[nycphp-talk] $_SERVER['REQUEST_METHOD'] and Javascript histor yobject
Freedman, Tom S.
Thomas.Freedman at ubs.com
Mon Jul 14 17:33:11 EDT 2003
I can't improve on Phil's solution options, but I did want to comment that
the JavaScript history object is locked for security reasons... imagine if
any site you visited could see everywhere you've been on the web since you
started up your browser, and log that information. It would be a huge
privacy breech. So they locked it up, and will let you move the user
forwards and back, but not actually see where they've been. As they say,
it's not a bug, it's a feature! :-)
-Tom
-----Original Message-----
From: Phil Powell [mailto:soazine at erols.com]
Sent: Monday, July 14, 2003 4:49 PM
To: NYPHP Talk
Subject: Re: [nycphp-talk] $_SERVER['REQUEST_METHOD'] and Javascript
historyobject
Will the previous page have any form elements? If so, within a form within
pageA.php you can have this:
<input type=hidden name=refURL value=<?= $PHP_SELF ?>>
Calling this form variable in pageB.php would ensure that they came from
pageA.php
You can also do this in a query string, however, a better solution would be
some kind of unique key, such as
pageB.php?var1=blah&var2=foo&...&uniqueKey=ICameFromPageA.php&...
That way you look for some unique string that could only have come from
pageA.php.
HTH
Phil
----- Original Message -----
From: betenoir at echonyc.com <mailto:betenoir at echonyc.com>
To: itp-alumni at forums.nyu.edu <mailto:itp-alumni at forums.nyu.edu> ;
talk at lists.nyphp.org <mailto:talk at lists.nyphp.org>
Sent: Monday, July 14, 2003 4:45 PM
Subject: [nycphp-talk] $_SERVER['REQUEST_METHOD'] and Javascript
historyobject
I'm trying to determine whether the user is coming to a given page (call it
pageB.php) from the previous page in the sequence (pageA.php) or off-site.
While I can access window.history.length, i cannot access a given key in
that array:
"Error: uncaught exception: Permission denied to get property
History.previous"
or
"Error: uncaught exception: Permission denied to call method History.item"
FWIW I'm using php and while I can determine the $_SERVER['REQUEST_METHOD']
this technique is not infallible. Apparently when you hit "back" (or select
from the "Go" menu) some browsers use the cached version of page -- which
means they return pageA.php and not pageX.html
Aaaaarrrrgggghhhh!!!!!
Suggestions?
Clyde
_____
_______________________________________________
talk mailing list
talk at lists.nyphp.org
http://lists.nyphp.org/mailman/listinfo/talk
Please do not transmit orders or instructions regarding a UBS account by
email. The information provided in this email or any attachments is not an
official transaction confirmation or account statement. For your protection,
do not include account numbers, Social Security numbers, credit card
numbers, passwords or other non-public information in your email. Because
the information contained in this message may be privileged, confidential,
proprietary or otherwise protected from disclosure, please notify us
immediately by replying to this message and deleting it from your computer
if you have received this communication in error. Thank you.
UBS Financial Services Inc.
UBS International Inc.
More information about the talk
mailing list