Welcome to WebmasterWorld Guest from 18.104.22.168 , 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
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
When a visitor selects index.html it calls lister.cgi
How? An SSI include statement?
the lister then provides a custom directory listing
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]
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?
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
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.