?
Solved

Set Cookie then route to other page ?

Posted on 2000-03-12
5
Medium Priority
?
169 Views
Last Modified: 2013-12-25
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 ?

regards
ItsMe
0
Comment
Question by:ItsMe
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 3

Accepted Solution

by:
fibdev earned 80 total points
ID: 2609391
This is easy!  :)
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
0
 

Author Comment

by:ItsMe
ID: 2609425
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 ...
0
 
LVL 3

Expert Comment

by:fibdev
ID: 2609442
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.
0
 
LVL 3

Expert Comment

by:fibdev
ID: 2609443
you could place javascript into the the heading of the page, but even then, the older browsers won't support it.
0
 

Author Comment

by:ItsMe
ID: 2609577
Thanks :-)
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you get a (Blue Screen of Death), your system writes a small file called a minidump. Your first step is to make certain your computer is setup to record memory dumps. Right click My Computer, choose properties. Click on the advanced tab, an…
In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at http://www.experts-exchange.com/ARTH_5123186.html (http://www.experts-ex…
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question