cookies and pages and sessions ( oh my! )
| From: | Dennis Gearon | Date: | Tue, 10 Apr 2001 21:19:08 +0000 |
| Subject: | cookies and pages and sessions ( oh my! ) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-48082@lists.php.net to get a copy of this message | ||
OK, a user visits my site and progresses through the following 3 pages,
none which have forms on them, using sessions.
PageA (http://URL-XYZ/)
SessionID=ID123 -> Cookie
PageID=PageA -> Cookie
PageB (http://URL-XYZ/)
SessionID=ID123 -> Cookie
PageID=PageB -> Cookie
PageC (http://URL-XYZ/)
SessionID=ID123 -> Cookie
PageID=PageC -> Cookie
If the user now uses the right click on the back button, skips from
'PageC' to back to 'PageA', what does the cookie contain?
I'm hoping that it contains:
SessionID=ID123 -> Cookie
PageID=PageA -> Cookie
because there's a separate cookie in memory for each instance of history
on the browser, and not,
SessionID=ID123 -> Cookie
PageID=PageC -> Cookie
so that when the user now connects to 'PageB' again, the script knows
that the user is coming from 'PageA', not assuming 'PageC'.
Any help on this use of cookies would be much appreciated.
It's obviously much easier with a hidden variable labeled with the page
name.