Welcome to WebmasterWorld Guest from 54.242.134.77

Forum Moderators: coopster & jatar k & phranque

Message Too Old, No Replies

how to pass last visited page

     

jwzumwalt

9:03 pm on Jul 12, 2009 (gmt 0)

5+ Year Member



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

10:17 am on Jul 14, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



When a visitor selects index.html it calls lister.cgi

How? An SSI include statement?

the lister then provides a custom directory listing

Huh?

jwzumwalt

7:34 pm on Jul 17, 2009 (gmt 0)

5+ Year Member



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

9:19 pm on Jul 17, 2009 (gmt 0)

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



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

2:00 am on Jul 19, 2009 (gmt 0)

5+ Year Member



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

2:12 am on Jul 19, 2009 (gmt 0)

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



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.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month