Posts

Showing posts from March, 2013

jQuery Performance Tips

Introduction
I've been working with jQuery for a while now and I have to say I'm very impressed. It really does live up to the headline, 'write less do more' and allows developers to become productive very quickly. This kind of immediate productivity is great but there is the potential for inexperienced jQuery developers to write code that performs poorly.
This was recently brought to my attention while working on a project where we were targeting IE8. Running on Chrome our application was perfectly responsive, but this was not the case when we switched to IE8. It’s well known that the JavaScript engine used by IE8 is considerably slower than that of the latest generation browsers, but I was still surprised by the difference in performance. The application was noticeably slower and the decreased performance had a significant impact on user experience.
After performing a few code reviews I put together some guidelines to help improve the efficiency of the jQuery we we…