[OFF] HTTP and HTML (was Re: CGI?)
[OFF] HTTP and HTML (was Re: CGI?)
- Subject: [OFF] HTTP and HTML (was Re: CGI?)
- From: Sander Tekelenburg <email@hidden>
- Date: Sat, 14 Apr 2001 01:46:51 +0200
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
At 14:15 -0700 UTC, on 13/04/2001, Jed Verity wrote:
[...]
>
on handle_cgi_request
>
--do stuff
>
return "<HTML>Returned from CGI</HTML>"
>
end handle_cgi_request
>
>
This page is displayed in the browser upon completion of the CGI script. It
>
could show results of the script, errors, a "thank you for...", a <meta
>
http-equiv> to redirect the browser, or anything else you want!
Don't use HTTP-EQUIVs when you can send real HTTP headers. Specifically the
META "refresh" HTTP-EQUIV is a non-standardized hack upon which you cannot
rely. If you must redirect, provide a HTTP "301 Moved permanently", or a "302
moved temporarily" header. See RFC 2068.
>
Typically, though, your HTML page is not going to be as simple as the
>
example above and you'll need to include content types
Again, don't include HTTP stuff inside HTML files. Send real HTTP headers for
things like Content-Type headers if you want to to be able to rely on things
to work (at least from your end - there's no way to fix a user's broken
browser of course.)
One reason is that the specs contradict each other when stating how
HTTP-EQUIVs should be handled: by the server, or by the client (and which
overrules when both?). Another reason (specific to "Content-Type") is a bug
in Netscape's browsers. See
<
http://www.euronet.nl/~tekelenb/WWW/netscapebug/index.html> for details.
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <
http://www.pgp.com>
iQA/AwUBOteP6esywKfXgqKdEQJlsQCfTCqeC/UHl46tjPsIcE9TrcGKHxAAoPRN
w39mrDjmUuF3x/xaRbAnwonK
=L4mq
-----END PGP SIGNATURE-----
--
Sander Tekelenburg, <
http://www.euronet.nl/~tekelenb/>
Mac user: "Macs only have 40 viruses, tops!"
PC user: "SEE! Not even the virus writers support Macs!"
References: | |
| >Re: CGI? (From: Jed Verity <email@hidden>) |