Welcome to WebmasterWorld Guest from 220.127.116.11 , register , free tools , login , search , pro membership , help , library , announcements , recent posts , open posts Become a Pro Member
how to pass last visited page jwzumwalt msg:3951126 9:03 pm on Jul 12, 2009 (gmt 0) I have made a custom Perl cgi directory lister. When a visitor selects index.html it calls lister.cgi, the lister then provides a custom directory listing. My problem is that each time the cgi program is called, it does not pass the last page visited info to the custom page. The user can not use the back button which is a real annoyance!
I can capture the last page visited using the environment variable HTTP_referrer, but how do I pass that information to the page created by the cgi program?
Thanks for the help, JZ
MichaelBluejay msg:3952135 10:17 am on Jul 14, 2009 (gmt 0)
When a visitor selects index.html it calls lister.cgi
How? An SSI include statement?
the lister then provides a custom directory listing
jwzumwalt msg:3954576 7:34 pm on Jul 17, 2009 (gmt 0)
Through a form action
<form name="MyForm" action="http://www.example.com/cgi-bin/list.cgi" method="post">
[ edited by: phranque at 9:12 pm (utc) on July 17, 2009] [edit reason] exemplified url [/edit]
phranque msg:3954631 9:19 pm on Jul 17, 2009 (gmt 0)
When a visitor selects index.html it calls lister.cgi, ... more precisely, that should read: "When a visitor submits the form in index.html it sends a POST request to list.cgi, ..."
what happens when you use the back button after the POST response?
jwzumwalt msg:3955173 2:00 am on Jul 19, 2009 (gmt 0)
1) Go to [snip] 2) select a subdirectory 3) then hit the *** browser's *** back button
The browser history is lost because of the mediation by the perl script!
[ edited by: phranque at 2:07 am (utc) on July 19, 2009] [edit reason] No urls, please. See
TOS [ webmasterworld.com] [/edit] phranque msg:3955175 2:12 am on Jul 19, 2009 (gmt 0)
your perl script cannot do anything to your browser history. please describe when happens when you hit the browser's back button.
try the entire scenario using firefox with the
livehttpheaders [ livehttpheaders.mozdev.org] add-on and look at the response headers for clues.