DelphiFAQ Home Search:

HTML Content invisible in IE, but properly shown in Firefox

 

comments3 comments. Current rating: 5 stars (1 votes). Leave comments and/ or rate it.

Recently I added some javascript to this web site and tested it in FireFox. Everything worked fine. Then I got emails that the comments were no longer visible. I tested, and could not confirm the problem. Today at a friend's house, I encountered the same problem. Comments were invisible on all pages if you used Internet Explorer. They would show fine in Firefox!

Here are some thoughts I had:

  • invalid Google Adsense code
  • run the HTML validator (it validated my page as 100% conform)
  • compare the HTML presented to IE with the HTML presented to FireFox (it was identical)

Eventually I found the reason for the problem.
See the code segment below. It causes text XXX to be rendered in FireFox but IE would not show it (it would treat it as a comment!)

The W3 HTML validator would not catch this as a bug!

Look at the bolded section - you can see that I forgot the matching closing part. FireFox would ignore this problem and recognize the end of the javascript by the /script tag. IE would ignore everything up to the //--> tag.

<script language=javascript>
<!--
alert('blah');
</script>

XXX

<script>
alert('blah2');
//-->
</script>

yyy

Content-type: text/html

Comments:

2012-09-20, 21:50:15
anonymous from China  
2012-10-23, 03:14:53
anonymous  
rating
I just read through the entire article of yours and it was quite good. This is a great article thanks for sharing this information http://www.megaabst..berseo.com
2012-11-13, 00:13:43
anonymous from China  
http://www.ravensgo.com Ravens Nike Jersey
http://www.ravensgo..ggs-jersey Terrell Suggs Jersey
http://www.ravensgo..ith-jersey Torrey Smith Jersey
http://www.ravensgo..eed-jersey Ed Reed Jersey
http://www.ravensgo..ata-jersey Haloti Ngata Jersey
http://www.ravensgo..wis-jersey Ray Lewis Jersey
http://www.ravensgo..ice-jersey Ray Rice Jersey
http://www.ravensgo..cco-jersey Joe Flacco Jersey
http://www.ravensgo..son-jersey Ed Dickson Jersey
http://www.ravensgo..din-jersey Anquan Boldin Jersey
http://www.ravensgo..nes-jersey Arthur Jones Jersey
http://www.ravensgo..rce-jersey Bernard Pierce Jersey
http://www.ravensgo..ard-jersey Bernard Pollard Jersey
http://www.ravensgo..iff-jersey Billy Cundiff Jersey
http://www.ravensgo..ney-jersey Bobby Rainey Jersey
http://www.ravensgo..ejo-jersey Brendon Ayanbadejo Jersey
http://www.ravensgo..son-jersey Christian Thompson Jersey
http://www.ravensgo..ham-jersey Corey Graham Jersey
http://www.ravensgo..haw-jersey Courtney Upshaw Jersey
http://www.ravensgo..ter-jersey Curtis Painter Jersey
http://www.ravensgo..tta-jersey Dennis Pitta Jersey
http://www.ravensgo..nes-jersey Jacoby Jones Jersey
http://www.ravensgo..ain-jersey Jameel McClain Jersey
http://www.ravensgo..ith-jersey Jimmy Smith Jersey
http://www.ravensgo..ele-jersey Kelechi Osemele Jersey
http://www.ravensgo..ebb-jersey Lardarius Webb Jersey
http://www.ravensgo..nda-jersey Marshal Yanda Jersey
http://www.ravensgo..irk-jersey Matt Birk Jersey
http://www.ravensgo..her-jersey Michael Oher Jersey
http://www.ravensgo..ger-jersey Paul Kruger Jersey
http://www.ravensgo..hee-jersey Pernell McPhee Jersey
http://www.ravensgo..ean-jersey Ryan McBean Jersey
http://www.ravensgo..och-jersey Sam Koch Jersey
http://www.ravensgo..ody-jersey Terrence Cody Jersey
http://www.ravensgo..lor-jersey Tyrod Taylor Jersey
http://www.ravensgo..ach-jersey Vonta Leach Jersey

 

 

NEW: Optional: Register   Login
Email address (not necessary):

Rate as
Hide my email when showing my comment.
Please notify me once a day about new comments on this topic.
Please provide a valid email address if you select this option, or post under a registered account.
 

Show city and country
Show country only
Hide my location
You can mark text as 'quoted' by putting [quote] .. [/quote] around it.
Please type in the code:

Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity.
The owner of this web site reserves the right to delete such material.

photo Add a picture: