Tech Stuff04 Feb 2008 01:27 am

Ok, any developer will tell you, IE6 can be a real hassle to develop for. Now I’ve certainly made my share of concessions, so another IE6 work around is nothing new. Having gotten used to more standards based browsers, I constantly think, why is IE so freaking popular! But alias, it is, so I have to support it.

Todays problem relates to optimizations IE seems to like doing. It tries to get all multithreaded and optimize things. I noticed this a few years ago when developing AIMPages, we were doing all kinds of XHR’s and DOM updates, etc. Well Firefox behaved as expected, IE on the other hand seemed to group DOM updates waiting till it had a free moment to do all the updates, optimizing JS by giving intensive processing operations higher priority and doing things out of order, etc. One thing I ended up doing was forcing wait states in the code so IE could “catch up.” You know, update the dom, clear the stack, etc.

Well I noticed issues earlier with my gallery code. The play mode runs via loading the next image into an image object (not even in the dom, just loaded to catch the image), I attach an onload event to it which triggers the actual image tag on the page to load, this will be faster since I’ve already loaded the image in another object so a new network call isn’t required. Also in the onload, the next image is loaded to my buffer image, which will again call it’s onload when the image is primed and tell the real image in the DOM to load. Well as I said, IE6 likes to optimize. Out of a gallery of say… 17 images, I only saw maybe 12 load, the rest…skipped? bunched together? I donno but it wasn’t flowing in a linear fashion. I was tempted to inject a some wait code via a setTimeout function call when I happened to read this article he puts the entire even in a setTimeout. Certainly more elegant then just a snippet injected in the function, have the whole function wait (while IE cleans up). It’s a bit late now for me to further explain the article, but I assume you can read it yourself :) For anyone doing processor intense stuff in IE, and had stuff go awry it’s worth a good read.

One Response to “IE 6, what a pain in the _ss”

  1. on 06 Feb 2008 at 11:44 pm Shelly

    Hey Handsome,

    Whats shaking? Interesting blogs. Just wanted to say hello. Hadn’t seen you on FB lately and hadn’t heard from you so I figured I’d drop you a line. Talk to you later.

    Michelle

Trackback this Post | Feed on comments to this Post

Leave a Reply