JavaScript - - By Craig Buckler

jQuery Is Used on Half of All Websites

According to recent research by W3Techs, jQuery is now used on half of all websites worldwide. The popular JavaScript library has come a long way since John Resig’s Selectors in Javascript blog post in 2005.

Perhaps of more interest is the fact that, of all sites using a JavaScript library, 88.3% opt for jQuery. It’s nearest competitor, MooTools, is far behind with less than 9%.

Bizarrely, 50% of sites using alternative libraries such as MooTools or Prototype also load jQuery. I strongly suspect many of those have been rapidly developed using a plethora of plugins to apply cool effects. Concern for bandwidth or efficiency fall by the wayside; no wonder average page weights have peaked at 1Mb.

Finally, the statistics reveal that webmasters prefer their own hosting. 73.4% load jQuery from the local server. 94.2% of the remaining 26.6% sites put their trust in Google’s CDN.

Why has jQuery become so popular?

One reason is Content Management Systems and bootstrap libraries which include jQuery by default. More than one fifth of all websites are based on WordPress — most will load it.

However, despite its success, jQuery receives a fair amount of criticism. It’s not particularly elegant or well-written. It’s tightly integrated with the DOM which can be slow and inefficient. Animation is better handled by CSS3. It doesn’t use or encourage good programming practices such as OOP or MVC. It gives programmers the misconception they understand JavaScript when they don’t. And the decision to drop IE6, 7 and 8 support in 2013 seems a tad premature.

You know what … none of that matters.

Complaints about jQuery mirror those leveled at PHP. Neither is recognized as being particularly ‘good’, but both get the job done quickly and effectively with the minimum of fuss. jQuery is lightweight. It’s extendible. It has great documentation. It has a huge following. Above all, it has a shallow learning curve and is easy to use.

If I need a JavaScript library, jQuery is my first choice. It’s probably yours too. Congratulations to the development team — and best of luck gaining that next 50% of all sites!

Will jQuery continue its meteoric rise or is it becoming increasingly irrelevant as browsers evolve?