Hi ! I'm using Perl, to set a cookie. After setting the cookie I want to route to another page but this doesn't work because the Browser interprets Location: http://www.anyserver... as text. Any idea which works with ANY Browser ?
#!/usr/bin/perl
#
print "Content-type:text/html\n";
print "Refresh:3; # change this number for how many seconds to wait. URL=http://www.yoursite.com/newpage.htm\n\n";
# (handle form stuff or whatever you want your CGI to do here ie: set the cookie)
# then print the redirect for old browsers, with META tag:
print <<EndHTML;
<html><head>
<title>Working ...</title>
</head>
<body>
The page you have requested have been moved<a href="http://www.yoursite.com/newpage.htm/">here</a>.<p>
</body>
</html>
EndHTML
0
ItsMeAuthor Commented:
I thougt of this, too. Does all Browsers support this Meta Tah (even MS-DOS Browsers) ? If, it would be enough to use the META tag ...
This method will work on ns and ie 3x and up browsers. I don't know about other browsers, but with the link, it will give you something to fall back on.
Put this in your cgi script ...
#!/usr/bin/perl
#
print "Content-type:text/html\n"
print "Refresh:3; # change this number for how many seconds to wait. URL=http://www.yoursite.com/newpage.htm\n\n";
# (handle form stuff or whatever you want your CGI to do here ie: set the cookie)
# then print the redirect for old browsers, with META tag:
print <<EndHTML;
<html><head>
<title>Working ...</title>
</head>
<body>
The page you have requested have been moved<a href="http://www.yoursite.com/newpage.htm/">here</a>.<p>
</body>
</html>
EndHTML