views:

92

answers:

5

In IE Java-script load slower than Firefox, Safari and Chrome?

Is there a way to load JavaScript quickly in IE also?

General best practice is to keep JavaScript at bottom of the page, does it make Js rendering more slow in IE?

Edit:

When we apply any jquery plugin to website to make any usable or interactivity then in IE effect shows slower than Other browsers.

We can easily identify the effect of condition on the page, before and after loading JS, which looks odd.

+4  A: 

The IE8 or below JavaScript engine sucks, it's better in IE8, but comparatively, it's still way behind...there's not a ton you can do about this if you're doing any heavy operations.

JavaScript is loaded and parsed each page, so the slower the engine, the slower the load...and that's the case with IE. Keeping JavaScript at the bottom of the <body> is one option, to prevent blocking, but likely your issue is not the loading (as this would be from cache, if your headers are set correctly), but the execution.

If it's any consolation, it seems IE9 is a major step forward, over IE8 at least.

It's a bit more general, but if you're looking to speed up your pages there are a few things to consider, Google has a good list for this and Yahoo does too.

Nick Craver
Is removing all white space from JavaScript can help in loading speed in IE?
metal-gear-solid
@metal-gear-solid - Absolutely. Run YUI Compressor on them: http://developer.yahoo.com/yui/compressor/
Gert G
@Gert G - thanks for reply . i will try this
metal-gear-solid
@metal-gear-solid - Yes, but *marginally* in most cases (I'm talking about **white space** in particular here). [Since the content should be delivered via gzip](http://code.google.com/speed/page-speed/docs/payload.html#GzipCompression) white space in particular will not have much of an impact, though minification renaming variables and such will.
Nick Craver
I also liked link of @Gret G
metal-gear-solid
A: 

You really shouldn't see that much of a difference for most interactive uses of JavaScript, which is the kind you find on most websites. However, if you have a lot of loops or do a lot of computation in your script, then you'll see a huge difference between various JS engines. In my experience, Chrome > Firefox > IE in terms of JS engine speed.

casablanca
+1  A: 

Not IE specific, but BetterExplained has some good points on how to increase load times or in some cases, Web page response times.

Gert G
+1 thanks for this useful link.
metal-gear-solid
+1  A: 

In terms of today's browsers, IE8's JS engine is slow, but IE9's will perform much better.

It's execution time that's slowing you down. Unfortunately, there's not a whole lot you can do about it.

josh3736
A: 

I believe your talking about the unsightly FOUC (flash of un-styled content).

Paul Irish has some tips to avoid this which is more prevalent in ie.

redsquare