I am having a problem with jQuery AJAX calls on IE7. This simple code works fine on FF and Opera. But on IE7 it takes 3-5sec. - that's 20 times slower than FF! Loading content is pure HTML and inline JavaScript code. No JS rendering. I even turned of the inline JavaScript code. Bu still slow.
$('#block').load('some url');
How to overcome this problem ? Any help would be greatly appreciated.
I'd have to see the actual code but faced to a similar problem I had to get rid of jQuery.load(). Instead, I used jQuery.get() with "html" data type and wrote my own callback, where I injected the data via .innerHTML. Doing so, I also hit another bug (it was a <select> tag and IE won't allow .innerHTML on it) so I wrote an ugly workaround.
Resulting code was something like this:
I had the same problem with the slow jscript ie7 engine. I added a status popup window for the human. I update the status window as the JS proceeds in chunks. Pseudo code:
Bottom line is that the user will see something changing on the screen. Note that the step of yielding with a timeout of 0 takes quite a while, relatively speaking. So my code tests the browser and does more work per chunk if it's anything other than IE.
It is very important to provide changing feedback to the user. Otherwise they think it is taking longer than it really is.
HTH,
Larry
There's really not much you can do. IE's javascript engine is way way slower than any of the others (in fact, it sucks). You can try out IE8. It is better... marginally...
Detect IE7 on page load, and provide a discrete suggestion that users who don't like slow loading should upgrade.