IE

Looking good in every browser

Oliver Brown
— This upcoming video may not be available to view yet.

Okay, “every” is overstating it. The site has always looked how it should in Firefox (and Mozilla variants) and Opera as well as almost right in Internet Explorer. And although I didn’t look in depth it seemed fine on Safari when I used a friend’s Mac.

Well now it looks how it should in IE too. Although I did have to do a pretty nasty hack of sorts (but I remain XHTML compliant).

IE supports “conditional comments”. They’re HTML comments in a specific format which IE interprets as special. Overall this is quite a clever idea since the other browsers see them as normal tags and technically my site isn’t using any no standard markup.

The dodginess in IE (if you hadn’t noticed or don’t use IE) is that the graphic behind the Google links bar was 1px to the left. So all I did was put a style definition inside an IE conditional comment to nudge it to the right: <!--[if IE]><style> #linksbar { background-position: 1px 0 } </style><![endif]-->

Apparently you can do cleverer things with the comments like so conditionals on specific version of IE but that’s getting a little silly and if you want that much control it’s probably better to do it on the server so you don’t send every version of a page to every browser…

For more information, check out conditional comments on Quirks Mode.

Netscape for web developers

Oliver Brown
— This upcoming video may not be available to view yet.

There is an article on MSDN about how to get round the ActiveX activation issues that will be introduced into IE shortly. On that page it mentioned something I didn’t know - the latest version of Netscape Browser (version 8) can use Internet Explorer’s rendering engine (Trident) instead of the Mozilla rendering engine, Gecko.

If you develop web sites these days you need to make sure you can support at least IE and Firefox and preferably Safari. Testing Safari is often not possible if you primarily use Windows but testing in IE and Firefox can now be done from the same browser - you can actually change rendering engine at any time with CTRL-SHIFT-E. It also supports all the cool developer features of Firefox (like the DOM Inspector (although if you are using the IE rendering engine you can’t just click an element to select it).

A problem with Firefox

Oliver Brown
— This upcoming video may not be available to view yet.

For a while I’ve noticed my computer running slower and slower for no apparent reason. Although I have a fairly old computer (Athlon 1.2GHz) it was running far slower than it should have been.

A (not so) quick look in task manager revealed a possible culprit - Firefox was running and taking up 80Mb of memory and it was increasing. Anybody any ideas what could cause a sudden and persistent memory leak in Firefox? The only extra I have installed is LiveHeaders. Until it’s fixed I’ve had to revert to IE.