I have a complex ASP.NET page that makes heavy usage of jquery for DOM manipulation (no AJAX). The page is faster in Mozilla based browsers (Firefox) compared to IE 7 or 8.
Are there some functions that are optimized for FF?
I have a complex ASP.NET page that makes heavy usage of jquery for DOM manipulation (no AJAX). The page is faster in Mozilla based browsers (Firefox) compared to IE 7 or 8.
Are there some functions that are optimized for FF?
Well, the JavaScript engine itself is faster in Firefox, so that would naturally extend to jQuery being faster.
Web Browser Average Runtime Relative ----------- --------------- -------- Safari 4.0.2 (530.19.1) 169 1x (fastest) Chrome 2.0.172.33 349 2.1x slower Firefox 3.5 377 2.2x slower Opera 9.64 (10487) 442 2.6x slower IE 8.0 771 4.6x slower
Source: http://celtickane.com/labs/web-browser-javascript-benchmark/
The power is in the javascript processing engine. Unlike serverside processing (PHP, ASP.net), javascript is client side, meaning that your visitor's browser all have to do the work of rendering the page. Competitors try to get people to switch to their browser by boasting faster processing of things like javascript.
This leads to all the browsers having their own processing engines. Which leads to some browsers being slower. IE:
Internet Explorer doesn't use the Mozilla Engine, so it is considerably slower than Firefox. Internet Explorer is known as one of the slower engines out of all the major browsers.
Firefox is slower than Chrome, which boats one of the highest Javascript Engines (A Modified Version of Webkit).
Safari I believe is currently the fastest rendering engine out there.
You can see more stats on this article from PCWorld, and here
Some benchmarks on JavaScript by browser: http://celtickane.com/labs/web-browser-javascript-benchmark/
It's not that things are optimized for FireFox, it's that the JavaScript interpreter in FireFox is heavily optimized as are the engines in Safari and Chrome. Microsoft has neglected browser development for sometime since it won the browser wars and only recently have they started addressing performance issues in IE8 because of their loss of market share.
Here's how things looked for jQuery on various browsers in Sept. 2008. In the first graph, that tall blue bar, the one that's taller than all the others combined, is IE7. That about sums up javascript performance in IE.