Difference between redirects

G

googleid2003

I know nothing about perl, so a friend of mine wrote a cgi script for
me to do a redirect on my website based on user input from a html form
using a variable $userName. The piece of code that does this:

print "Content-type:text/html\n\n";

print "<html><head><meta http-equiv=\"refresh\"
content=\"0;url=$path$userName\"></head><body></body>\n";

What's the pros/cons, if any, or difference between this and the
following:

print "Location: http://www.somesite.com/directory/$userName\n\n";

They seem to do the same thing, and I wonder which is "better".
Thanks,
Mike
 
A

A. Sinan Unur

(e-mail address removed) wrote in @c13g2000cwb.googlegroups.com:
I know nothing about perl, so a friend of mine wrote a cgi script for
me to do a redirect on my website based on user input from a html form
using a variable $userName. The piece of code that does this:

print "Content-type:text/html\n\n";
print "<html><head><meta http-equiv=\"refresh\"
content=\"0;url=$path$userName\"></head><body></body>\n";

What's the pros/cons, if any, or difference between this and the
following:

print "Location: http://www.somesite.com/directory/$userName\n\n";

This is not a Perl question. It is a CGI question. As such, it is off-
topic here. You'll better off posting it to a CGI group such as
comp.infosystems.www.authoring.cgi

See also http://cgi-spec.golux.com/cgi-120-00a.html#8.0

Sinan.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,040
Latest member
papereejit

Latest Threads

Top