What's a quick, pure javascript replacement for jquery.browser (removed in jquery 1.9)?-Collection of common programming errors
JQuery released a Migrate plugin that restores $.browser when used with 1.9. Just be sure to use the production version of Migrate on production servers. The development version will generate a bunch of console messages telling you where your code would break in 1.9 sans Migrate.
Using JQuery Migrate to restore $.browser probably isn’t the best long term solution, however. As the name implies, it’s intended as a transitional tool, and I don’t know that its browser detection functionality will be actively maintained. An alternative would be Modernizr.
What I personally will be doing is keeping my production site on JQ 1.8 for the time being, and testing things out with the development version of Migrate on my dev machine to get a better idea of what 1.9 will break (they did a lot more than just remove $.browser) before deciding on an upgrade strategy.
Originally posted 2013-11-09 20:02:48.