Welcome to WebmasterWorld Guest from 54.160.254.203

Forum Moderators: coopster & jatar k & phranque

Message Too Old, No Replies

how to pass last visited page

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

New User

5+ Year Member

joined:Dec 25, 2007
posts:12
votes: 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

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

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 12, 2003
posts:1199
votes: 0


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

How? An SSI include statement?

the lister then provides a custom directory listing

Huh?

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

New User

5+ Year Member

joined:Dec 25, 2007
posts:12
votes: 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]

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

Administrator

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

joined:Aug 10, 2004
posts:10544
votes: 8


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?

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

New User

5+ Year Member

joined:Dec 25, 2007
posts:12
votes: 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]

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

Administrator

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

joined:Aug 10, 2004
posts:10544
votes: 8


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.