CGI Redirect to another page

Andrew Chalk achalk at XXXmagnacartasoftware.com
Wed Sep 24 17:54:34 EDT 2003


What is wrong with meta-refresh?

"Andrew Clover" <and-google at doxdesk.com> wrote in message
news:2c60a528.0309240338.1e4dd261 at posting.google.com...
> Tim Howarth <tim at worthy.demon.co.uk> wrote:
>
> > print "Location: http://abcxyz/index.html"
>
> > AFAIUI it simply sends a redirect header.
>
> Yep; however, if you include a relative URI with no hashpart:
>
>   print 'Location: /index.html'
>   print
>
> Then the server should send that page to the browser directly, without
> sending a redirect back to the browser. This may be preferable in
> some cases.
>
> (The second print is needed to end the CGI response headers.)
>
> Full spec here:
>
>   http://hoohoo.ncsa.uiuc.edu/cgi/interface.html
>
> (Using JavaScript or meta-refresh to do redirects is almost always a
> really terrible idea.)
>
> -- 
> Andrew Clover
> mailto:and at doxdesk.com
> http://www.doxdesk.com/






More information about the Python-list mailing list