FAQ : Frequently Asked Questions
FAQ Table of contents
blue line
18. Q:  The output from my CGI is correctly interpreted by MS Internet Explorer, whereas Netscape Navigator would display it as a plain text. What should I do to have also Netscape interpreting the HTML output from my CGI?

A:  A CGI should always start the HTML response in the following way:
Content-type: text/html

<html>

The " Content-type: text/html" line contains a so called "HTTP header". This header MUST be followed by a blank line. See also our page Externally defined HTML.

This header tells the remote browser that the response contains an HTML script to be interpreted.

While MS Internet Explorer, in absence of such a header, assumes it by default, Netscape Navigator assumes a text default. Apparently the two products didn't agree on a standard approach. But this is just one of the many examples of disagreement.

blue line