The IE8 ’<noscript>-ghost’ appearance bug

This bug is also published at Position Is Everything


The <noscript> element

The contents of a <noscript> element should only be displayed when there is no script engine or running of scripts is switched off. The <noscript> tag originated in those olden days when some browsers didn't have JavaScript on board. Nowadays the tag has lost much of its value, as all browsers have script support for decades, and only a very limited number of users switches off JavaScript in daily practice. Nevertheless, the <noscript> tag isn't deprecated, and remains valuable in these limited situations.


The bug

On Internet Explorer 8 in its default view, the <noscript> element may enjoy a wonderful revival... This may happen when you have styled the <noscript> element to have a background-color or a border, so as to have it clearly show up in the unfortunate case there is no script, like so:


Now, with the newest Internet Explorer, IE8, heralded to finally support the standards, with a script engine running at full swing, all of a sudden a ghost of the <noscript> element appears. A block showing the <noscript> element by its borders, background color and padding, shows up! See it yourself, by viewing this page in IE8. IE8 apparently forgets that the <noscript> element, should only be displayed when, well... when there is no script.

The bug isn't present in Firefox3, Opera9, Safari3 on Windows and Chrome1.




But, no panic, there is a way to get rid of this ghost. Simply turn on 'Compatibility View'.



Of course, with switching to 'Compatibility View', so basically reverting to the IE7 rendering machine, the bugs and non-standard behaviour of the previous IE's return...

Web-developers across the world were so happy IE8 was finally going to relieve them of the burden of 'fixing the site for IE', but as it appears, Internet Explorer remains causing extra work and keeps on preventing web-developers from working efficiently...

Updated last: April 20th, 2009.