The JavaScript engines of popular web browsers vary greatly in performance. The variance in performance is surprising.
Running this test: http://celtickane.com/labs/web-browser-javascript-benchmark/
On my laptop, here are my results (lower is better, your results my vary):
Safari 4: 128
Firefox 3.5: 233
Camino: 615
IE 7: 1181
IE 7 is almost 10 X slower than Safari 4. With more and more sites building rich interfaces and AJAX driven interaction this can be a serious issue. Recently I was working on a redesign of some category navigation pages. The new interface used AJAX loaded content and multiple tabs to display content. It worked great under Firefox, IE 6, IE 8, Safari 3, Safari 4, but was painfully slow under IE 7. Slow enough that in deference to the high number of customers still using IE 7, and the potential sales loss, we had to remove much of the rich interface.
Be sure to test your rich interfaces in IE 7 and pay attention to performance. Until people move off of IE 7, we are all somewhat hamstrung with regards to how much JavaScript and AJAX we can use on eCommerce sites.
One thing to keep in mind is to try to limit the number of AJAX requests. IE 7 (and many other browsers) limit concurrent requests to 2, meaning if you’re loading 12 fragments via AJAX, it will take 6 full requests/response cycles, each one taking ~200-500 ms. That adds up very quickly. You can pull everything down in one large AJAX request, parse that response’s DOM tree, and extract the pieces you need, but A) that’s more JavaScript you’re using, and B) at some point you’re better off just loading a new page.
Another thing to consider is that while JavaScript and AJAX allow us to build better interfaces for our users, allowing them to be better served by our sites, it’s often easy to get distracted by what you can do, and by buzzwords, and lose sight of what actually benefits your users and what doesn’t.
Friends don’t let friends use IE 7.
Leave a Reply