Loading ...
Sorry, an error occurred while loading the content.

Bad Rendering MSIE vs FF

Expand Messages
  • Ray Shapp
    Hello All, I use a form to invoke a CGI script for searching our club s collection of library books. When I search by Author, Title, Publisher, or Year the
    Message 1 of 4 , Dec 15, 2006
    • 0 Attachment
      Hello All,

      I use a form to invoke a CGI script for searching our club's collection of
      library books. When I search by Author, Title, Publisher, or Year the results
      render properly in both MSIE v6 and Firefox v1.5.0.8. When I browse by
      Subject, MSIE renders the output fine, but Firefox shows the raw HTML -- not
      as a web page. I have copied the output to a separate text file, and saved it
      as "browse.htm". then that file renders properly in both browsers. I have run
      browse.htm through the CSE HTML Validator, and the only complaint is that some
      books contain an unescaped ampersand in the title. I doubt that's causing the
      problem because when I create a test file, containing unescaped ampersands,
      Firefox renders it as a web page with no problem.

      To see an example, please visit www.asterism.org Then click Club Activities >
      Library Book Search. If you use the Find form for Author, Title, Publisher or
      Year, both browsers render OK. If you use the Browse form for any subject,
      only Firefox will fail.

      Thanks for the help.

      Ray Shapp
    • loro
      ... No, not only FF. I d guess most browsers except IE will show the page as text. Mostly servers default to the content-type text/plain if nothing else is
      Message 2 of 4 , Dec 15, 2006
      • 0 Attachment
        Ray Shapp wrote:

        >When I browse by Subject, MSIE renders the output fine, but Firefox shows
        >the raw HTML -- not
        >as a web page. I have copied the output to a separate text file, and saved it
        >as "browse.htm". then that file renders properly in both browsers. I have run
        >browse.htm through the CSE HTML Validator, and the only complaint is that some
        >books contain an unescaped ampersand in the title. I doubt that's causing the
        >problem because when I create a test file, containing unescaped ampersands,
        >Firefox renders it as a web page with no problem.
        >
        >To see an example, please visit www.asterism.org Then click Club Activities >
        >Library Book Search. If you use the Find form for Author, Title, Publisher or
        >Year, both browsers render OK. If you use the Browse form for any subject,
        >only Firefox will fail.

        No, not only FF. I'd guess most browsers except IE will show the page as
        text. Mostly servers default to the content-type text/plain if nothing else
        is specified. That's what happens here. But IE is IE. If it sees a HTML tag
        it goes at it. Same thing happens if you name your pages something.txt.
        When on a server IE will treat them as text/html. Locally it's different.

        You need to make your script print a HTTP-header with the correct
        content-type before it outputs any HTML.
        print "Content-Type: text/html\n\n";

        Lotta
      • loro
        Me wrote: You need to make your script print a HTTP-header with the correct ... I see now that you have the header below helloContent-Type text/html
        Message 3 of 4 , Dec 15, 2006
        • 0 Attachment
          Me wrote:
          You need to make your script print a HTTP-header with the correct
          >content-type before it outputs any HTML.
          >print "Content-Type: text/html\n\n";

          I see now that you have the header below

          helloContent-Type text/html

          AFAIK there is no such thing as helloContent-Type so I guess you have
          something fishy in there. Find the 'hello'... ;-)

          Lotta
        • Rudolf Horbas
          ... The things that grow out of a hello world -script ... :-) Rudi
          Message 4 of 4 , Dec 15, 2006
          • 0 Attachment
            > AFAIK there is no such thing as helloContent-Type so I guess you have
            > something fishy in there. Find the 'hello'... ;-)

            The things that grow out of a "hello world"-script ... :-)

            Rudi
          Your message has been successfully submitted and would be delivered to recipients shortly.