When you recommend updating jQuery/jQuery UI? Or in other words: what are the best practices for updating jQuery/jQuery UI?

I’m working on a long project that will take at least one more year. In that time span, I’m sure that jQuery/jQuery UI will be updated many times.

Do you recommend update my jQuery/jQuery UI files every time an update is released? Or is better to stick with a particular version until the end of the project?

I’m afraid of “breaking” code changes, and every time an update is released, I have to test everything. That takes too much time. But on the other hand, if I didn’t update, I’m afraid of bugs that later will bite me in the rear.

The project is an ASP.MVC and I use jQuery a lot.

Any thoughts?

  • This article may be relevant: it urges always being at the tip by linking to the Google-hosted version: encosia.com/… Commented Dec 17, 2012 at 15:52

7 Answers 7


Update your version of jQuery if and only if you need some new feature that's included in the new version. Simple as that.

If you frequently develop using jQuery, keep an eye on the official blog to know when updates are released and what they offer. Wait a couple of weeks or so before upgrading to the latest version to make sure any unexpected bugs get shaken out.

  • 1
    +1 it's the most stable way to do it, upgrading for the sake of upgrading increases your overall development time when you end up fighting bugs. Commented Oct 10, 2011 at 12:47
  • 2
    Also, keep an eye on your plug-ins. Sometimes a plug-in's bug fix requires upgrading the core jQuery code. Commented Oct 10, 2011 at 15:57
  • 12
    I disagree with this answer. If the product is still in development, as it sounds like from the question, then upgrade with each new release of jQuery. If the product is in production, then I agree with this answer, upgrade only when an upgrade is required (bug fixes, new feature.. etc) Commented Dec 17, 2012 at 18:13
  • @ChuckConway: Well said.
    – Jim G.
    Commented Jun 20, 2014 at 18:40

You should upgrade with each release of jQuery -- just take a peek at the update logs before updating.

The jQuery team is very good about documenting API changes and deprecated calls. At this point, the vast majority of the API is quite stable and probably won't change. Most changes are behind-the-scenes bug fixes that do not affect the outward API. This is especially true with the latest releases (1.8+).

Another great reason to update is because regardless of whether or not you remain on a project, that project will be maintained by somebody after you're done with it. Upgrading to latest version is beneficial for you, future developers and users -- because the newer versions of jQuery blow the older ones out of the water... so go ahead and update the thang.

  • 4
    This should be the accepted answer, leaving it just means when you finally do want to upgrade you have to make larger version jumps which is much harder. Commented Feb 11, 2013 at 4:59

Upgrade as soon as you can without breaking anything. New functionalities, bug fix, new features are introduced in every iterations.

You might not need the latest features but when you do, you'll need to validate every new version in between what you have to make sure it doesn't break anything.

Small increment will allow you to keep everything up to date without having to upgrade 5 major releases and spend 5 hours testing everything at once.

  • 1
    I'm still trying to figure out if updating from 1.4.x to 1.7.x will break anything.
    – styfle
    Commented Jul 17, 2012 at 3:17

Do you need any of the new features included in a newer version of JQuery? Does your site work as expected today?

If you answered "no" to the first and "yes" to the second question, then don't upgrade jQuery.

If you DO need new functionality, then you have to balance this against the cost of increased testing and possible introduction of new issues.

If you have issues with your current version of JQuery, then a newer version may have fixed your issue, but you still have an increased test burden because you have to ensure the new version doesn't break anything else.

This is why having a good suite of unit, functional and feature tests is so essential.


Only you can decide if the risks are worth it. Personally, I like to stay up to date. However, i have had a few bugs introduced when upgrading that broke something (or caused odd behavior). Since you have a year of development ahead of you, chances are it will have to go through a final QA anyways.

I say keep up to date. It's much easier to do continuous small integrations than large ones all at once.


Test. Test, test, test, test, test.

I used jQuery UI version (then-current) on a project, and used an external plugin called .autocomplete that did type-ahead functionality, tying a text field to a JSON data source. Used it a LOT of places.

Then, months later, I needed to add a slider control that only came in a later-current version. Unfortunately, that later-current version added a native autocomplete function, which they claimed was the spiritual successor of the plugin I'd used, but which used entirely different methodology, functions, and data requirements, breaking the autocomplete fields on every page I used my new slider on.

Because the pages I was developing this new feature on didn't use autocompletes, I didn't notice. Because my client was in a rush to get this feature up before a trade show, it got rushed through staging and testing, and got into production with a crapton of broken autocompletes.

Ultimately, it was a failure of MY testing. And the lesson learned is, jQuery and jQuery UI have very little interest in backward compatibility. Which puts the requirement on us, as devs, to test and test and test.


In my experience, new versions of jQuery are generally more rigorous in their code cleanliness requirements regarding the calling code (your code).

There are numerous items that have been made deprecated ( http://api.jquery.com/category/deprecated/). There is no deprecated-since tag on the page, unfortunately. Older deprecations are more likely to break something.

Most notably (to me), the :checkbox selector and the toggle() function have been deprecated. Some time ago, this change has affected my own (oldest) jquery code. I did not this realize for a while.

On the other hand, newer jQuery releases usually come with substantial performance improvements. Check the changelogs, or maybe one of John Resig's presentations to see where the performance improvements were realized. If you would get any benefit from them... that's up to you to decide.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.