Noticed this site was causing firefox to hang for about a minute and peg my CPU, so I profiled it:
The Addthis script you're using has an onReady method that gets called 94 times on pageload and takes an average 12 seconds to run each time. During this time Firefox gets the dreaded beachball/umbrella.
I'm having similar issues on a site we're using sharethis on, but not quite that bad on page load - it does increase the constant load on the cpu by about 15% though.
Edit: I just tried it in Firefox 3.5.2 and no problem either.
I'm running Mac OS X Snow Leopard on a Macbook 2ghz duo, 2gb ram.
Possibilities: It could be Firefox 3.0, try updating. Or it might be the 64 bit power of Snow Leopard that makes it faster for me. But then again Firefox is still a 32 bit application.
Even so, it's pretty egregious that something so simple would be so heavy. Works fine in safari for me, too, but according to statcounter about 15% of people are still using FF 3.0.
Was just wondering - what did you use to profile the page? Anything besides just firebug? I'm interested because we use AddThis as well, and I've noticed our site seems slow lately...
That is the easiest strategy, but the author doesn't mean it, and the entire collection of info backs that up. He even says so a few lines later:
"This isn't one of those rants about IE6 or a campaign to try to kill it. There are enough of those around the web, but they don't help if you need to support IE6 because it still has a significant enough marketshare that you can't ignore it for business reasons. No, this is the resource you've been hoping for."
But yes, I'd love not to support IE6 in all of my work, but that's just not happening...yet.
It's often simpler, though not necessarily easier, to code a design with progressive enhancement in mind rather than graceful degradation. Designing a structure that functions properly in IE6 is not difficult.
In some cases this is impossible. I work for a company that uses a lot of internal applications that depend on old IE. Asking them to switch to Firefox is like asking them to shoot themselves in the head. A sad reality.
If there's a culture that refuses to upgrade software, then the solution requires both the education of those who are not upgrading, and the solutions to let them do it. For example, present the relative costs of staying put (mainly risk to the business, e.g. several million dollars a few years from now if everything breaks), against the costs of hiring someone to fix it. Bring in the people who could fix it, and find some quotes.
In other words, the people who made the irresponsible decision to stick with old software should have to cover the cost of fixing it. Every site on the Internet should not continue to cover this cost for them.
You shouldn't really be including hacks straight into your main css. The main reason being that you have no idea how future browsers will handle the hack because is basically undocumented, and this might cause you - or your client - grief in the future.
Include a new stylesheet via conditional comments and you can isolate any IE browser while not needing any hacks. (i.e., you can just declare the background color directly)
Most clients don't want to pay you to create an IE only CSS file, takes minutes I agree but if they won't pay a few quid extra then why should I do it.
TBH I usually do this sort of thing (add an ie6.css file instead of a hack) as I tend to over-engineer rather than keeping to the agreed spec and work schedule.
Has anyone explored using user agent sniffing to serve up completely different pages for IE6? Create a set of simple vanilla pages (much like you might for mobile) that are independent so that you don't mess up modern browsers with the hackery.
Don't need to. You can include completely different stylesheets and javascript files simply with IE conditional comments (IE parses what's in them based on simple rules like, version >= 7; all other browsers ignore them as comments): http://www.javascriptkit.com/howto/cc2.shtml
If you code to standards and follow unobtrusive / degradable javascript patterns, your site should work without stylesheets and javascript anyway :)
It makes IE use its old renderer calculations (hasLayout) for whatever element you put it on, so it often fixes disappearing items, incorrect overflow, floats, padding/spacing etc. If your style looks correct in other browsers, give zoom:1 a shot on IE6 and see if it fixes things before wasting another minute.
ps. For those that are validation crazy, there are other triggers for hasLayout that will validate (certain padding, margins, etc.) but they vary from element to element, whether they have ancestors, etc. and you'll waste a great deal of time figuring them out.
Is this a joke? After reading about how zoom:1 is essentially a miracle, you'd be hesitant to use it because it doesn't pass a very arbitrary and often stupid set of rules?
I'm not meaning to put you down, but I just don't understand this validation craze -- beyond the fact that you can say "it validates, does yours?" It seems as though it is some sort of psychological/sociological game... and I was hoping us developers were beyond that sort of thing.
I would be more impressed if there were a validation that said: "This actually looks like it should in X, Y, and Z browsers."
Whether something "looks like it should" in the browsers is a function of the browser makers. Whether code is valid and meets the spec is a function of the coders. If the browsers are well programmed then designing to spec means that the pages will appear as expected in those browsers.
The MSIE team basically created an undocumented system called hasLayout and didn't bother to tell anyone until the fixes had been found - if I add "zoom:1" there's nothing to say that the next update of MSIE won't balk at that or that W3C won't adopt zoom using % making my pages potentially (only in later IE I'd warrant) zoom to 1%.
As for "looks like it should" I'm sure you know that (X)HTML & CSS are not intended to convey the same visual expression to every browser. If you want identical visuals then web pages aren't what you're after.
Yes I have used zoom on pages when clients haven't been bothered about web standards. I contend that accessibility of pages by _all_ well-made browsers can only be assured by coding to the agreed standards.
MS: whacks man on head
man: "hey, wtf?"
MS: whacks man on head
man (putting on helmet): "please don't do that it's not right" (doesn't meet the arbitrary standards of public decency!)
MS: "Put a helmet on or when we whack you it will hurt bad"
Which is why no other browser does anything with it, which is why it works so nicely.
The only drawback is that it doesn't validate. You can either wrap it in a conditional comment or incur the wrath of the standardistas and leave it be.
Isn't IE 6 still around because many companies still standardize on it for their intranets? I would think the answer is Yes as evidenced by MSFT's recent life extension to 2014.
Let me put it like this: Microsoft is only supporting (issuing security updates to, etc) IE6 because it was shipped with XP and Microsoft is still supporting XP. XP can't enter into the legacy version phase due to the large number of customers refusing to upgrade. If Microsoft could phase out XP, it could phase out IE6 as well. If Microsoft phased out IE6, companies would be forced to phase out IE6 as well. Hence, everyone who's refusing to upgrade to Vista (or Windows 7 soon) is helping keeping IE6 alive.
How did you come to this conclusion? IE4 and IE5 were swiftly phased out by the "new, improved, IE6!" if I remember rightly, and I think ActiveX was seriously improved and overhauled with IE6 which many companies use(d) in their intranet.
I don't mind Vista any longer, and this was written on Vista, but I don't like it. If you want to talk about refusing to upgrade... I still like Windows 98 better than all "improvements" upon it, because it never crashed on me.
last week i booted an old box with ie6 as the only browser around, windows update was pushing ie8 as a critical update. i didn't apply it, because a real install of ie6 (not the stand alone collection) is what that system is used for...but it is nice to know that msft is pushing users to upgrade with a bit more emphasis than in the past (an optional upgrade, though critical upgrades are optional)
Jsm, you might be happy to know, but any Windows system with IE can go back to IE6. I just found IETester recently, and it's been an awesome pack to test compatibility with IE5.5 - IE8!
But MSFT suggests later versions of IE via software updates, even on XP. No? So wouldn't most consumers be on versions newer than IE6 and thus the majority of IE6 users are those from within organizations that don't upgrade?
The Addthis script you're using has an onReady method that gets called 94 times on pageload and takes an average 12 seconds to run each time. During this time Firefox gets the dreaded beachball/umbrella.
I'm having similar issues on a site we're using sharethis on, but not quite that bad on page load - it does increase the constant load on the cpu by about 15% though.
Be careful when using these widgets...
(macbook pro; 2.4ghz; 4gb ram; ff 3.0)