Being a web developer I have noticed that anything I create works absolutely great in all browsers, but always always always has a speed issue in Internet Explorer. Please note I am referring to speed, as I always take care that it displays and works across all browsers.
Is there anywhere, or does anyone have, good programming tips for internet explorer? I mean how to do things, so as that it's more or less optimized for internet explorer.
I mean my latest example is that I return JSON data from DB (via AJAX) and then I build the page with the results. The response from the server is minimal, and it loads instantaneoulsy in aaaaall browser, but takes 5-10 seconds in internet explorer depending on OS and ie version.
I am lost for words, and I was just wondering if there's anything I can do.
Examples: http://msdn.microsoft.com/en-us/library/ms533019(VS.85).aspx http://www.quirksmode.org/dom/innerhtml.html Link
-theo
Short answer: don't use DOM methods like document.createElement("div") in IE to create markup. Build your HTML with strings instead.
If you must use DOM methods, make sure you don't add elements to the page more than once. That is, create a main container to which everything is added, then as a final step call document.body.appendChild("div") (where "div" is your main container). That minimizes the amount of rerendering that will go on.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With