A while back, I started writing a web app, which still hasn't quite made it to public availability - but which I use myself, even in its incomplete state. I knew as of the first public beta of Firefox 3 that this app didn't seem to work at all in Firefox 3 - but I was never terribly bothered about why.
Tonight, I decided that it was finally time (since I now use Firefox 3 on my laptop, desktop PC and work PC) to investigate the cause of the problem. For some reason, nothing was rendering at all once I logged in to the app - I was left with a white page. There's some static HTML content which should have been displaying, even if there had been JavaScript errors - which Firebug reported none of.
I started using Firebug to poke around, and I noticed that the static HTML content was indeed being returned in the HTTP response - but for some reason was not being rendered. I looked a little more closely, and noticed that I'd been lazy with one of my script tags, and closed it as a one-sided tag (<script src="..." type="text/javascript" />) - which is technically invalid, but Firefox 1.5 and 2, Opera and even IE6 (I haven't actually tried it in IE7) didn't seem to have a problem with. Firefox 3, on the other hand, handles this error in a rather odd (and annoying) manner: it eats the rest of the page content.
What I mean by this is that the page content totally disappears from the DOM - it appears that it first treats everything which follows the malformed script tag as the tag's body - but then downloads the external .js file and replaces the tag's body with its contents, thus losing the rest of the page. If, like in my case, the malformed script tag is in the <head> section of the page, you'll simply get a white screen, since the entirety of the <body> section is lost in this way - along with any onload events defined in the opening <body> tag (hence the lack of JS errors).
Tonight, I decided that it was finally time (since I now use Firefox 3 on my laptop, desktop PC and work PC) to investigate the cause of the problem. For some reason, nothing was rendering at all once I logged in to the app - I was left with a white page. There's some static HTML content which should have been displaying, even if there had been JavaScript errors - which Firebug reported none of.
I started using Firebug to poke around, and I noticed that the static HTML content was indeed being returned in the HTTP response - but for some reason was not being rendered. I looked a little more closely, and noticed that I'd been lazy with one of my script tags, and closed it as a one-sided tag (<script src="..." type="text/javascript" />) - which is technically invalid, but Firefox 1.5 and 2, Opera and even IE6 (I haven't actually tried it in IE7) didn't seem to have a problem with. Firefox 3, on the other hand, handles this error in a rather odd (and annoying) manner: it eats the rest of the page content.
What I mean by this is that the page content totally disappears from the DOM - it appears that it first treats everything which follows the malformed script tag as the tag's body - but then downloads the external .js file and replaces the tag's body with its contents, thus losing the rest of the page. If, like in my case, the malformed script tag is in the <head> section of the page, you'll simply get a white screen, since the entirety of the <body> section is lost in this way - along with any onload events defined in the opening <body> tag (hence the lack of JS errors).
Currently listening to: Coldplay - White Shadows