Set Cookie then route to other page ?

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 ?

Who is Participating?
fibdevConnect With a Mentor Commented:
This is easy!  :)
Put this in your cgi script ...

print "Content-type:text/html\n";
print "Refresh:3; # change this number for how many seconds to wait. URL=\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;
<title>Working ...</title>
The page you have requested have been moved<a href="">here</a>.<p>
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.
you could place javascript into the the heading of the page, but even then, the older browsers won't support it.
ItsMeAuthor Commented:
Thanks :-)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.