5704Re: [NH] Bad Rendering MSIE vs FF
- Dec 15, 2006Ray Shapp wrote:
>When I browse by Subject, MSIE renders the output fine, but Firefox showsNo, not only FF. I'd guess most browsers except IE will show the page as
>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.
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";
- << Previous post in topic Next post in topic >>