How to fix the $.browser undefined error in WordPress
Why old plugins and themes throw a jQuery $.browser error, how to find the code responsible, and how to fix it properly instead of rolling jQuery back.
At a glance
A console error such as jQuery.browser is undefined means a script on your site uses a feature jQuery removed in version 1.9. WordPress now ships jQuery 3.x and no longer loads the migrate helper by default, so old code fails and takes that script down. The real fix is to update or replace the code responsible, with the migrate helper only as a short-term bridge.
Updated November 29, 2026 · For WordPress site owners and developers seeing jQuery errors
- For owners and developers with dead sliders, menus or forms and a $.browser console error
- Cause code calling jQuery.browser, removed in jQuery 1.9
- Trigger WordPress 5.5 stopped loading jQuery Migrate by default
- Real fix update or replace the plugin or theme, or use feature detection
- Stopgap the Enable jQuery Migrate Helper plugin, tested on staging first
- Avoid rolling WordPress or jQuery back to an old version
- Help WordPress support or emergency support
On this page
- Why does it happen?
- How do I find and fix it?
- What does the old code look like, and what replaces it?
- Why is only one script failing when many load?
- What if I need a temporary bridge?
- Worked example: a slider that stopped after an update
- How do I check the fix worked, and stop it returning?
- Which fix suits which situation?
- When to ask for help
- FAQ
If your browser console shows an error like Cannot read properties of undefined (reading 'msie'), or older wording such as jQuery.browser is undefined, a script on your site is using a feature jQuery removed more than a decade ago. The real fix is to update or replace the code that uses it.
Why does it happen?
jQuery.browser reported which browser the visitor used. It was deprecated and then removed in jQuery 1.9 because browser sniffing is unreliable. WordPress core has moved to jQuery 3.x, so any plugin, theme or bundled library that still calls $.browser now breaks, and the rest of that script usually stops running, which is why sliders, menus or forms go dead.
Core used to load the jQuery Migrate helper, which hid problems like this. It stopped doing so by default in WordPress 5.5, which is when many old sites started showing the error.
How do I find and fix it?
- Confirm the error
Open the page, then developer tools and the Console tab, and reload.
- Read the file and line number
A path under
wp-content/plugins/some-plugin/names the plugin or theme. - Update the plugin or theme
Most maintained products have already removed
$.browser. - Replace it if unmaintained,
with an alternative.
- If you own the code,
replace the browser check with feature detection.
You can also search the code. From the WordPress root over SSH:
grep -rn "\.browser" wp-content/plugins wp-content/themes --include=*.jsExpect some harmless matches, such as unrelated properties named browser. Look for $.browser and jQuery.browser.
What does the old code look like, and what replaces it?
Old scripts sniff the browser to work around quirks that no longer exist:
if ($.browser.msie && $.browser.version < 9) {
// old workaround
}Internet Explorer is no longer supported by current WordPress, so in nearly every case the branch can simply be deleted. Where behaviour depends on a capability, test the capability:
if ('IntersectionObserver' in window) {
// use it
} else {
// fall back
}| Question | Use |
|---|---|
| Does the browser support a CSS feature? | CSS.supports('display', 'grid') |
| Is the screen small? | window.matchMedia('(max-width: 600px)').matches |
| Does an API exist? | 'IntersectionObserver' in window |
Make these changes in a child theme or your own plugin, never in a third-party plugin's files, because the next update would overwrite them.
Why is only one script failing when many load?
JavaScript errors stop only the script they occur in. If a theme bundles its scripts into one file, a single $.browser call can take everything with it, which is why a menu, a slider and a form all die at once. Check the console for the first error, not the last: later messages are often consequences.
What if I need a temporary bridge?
If the site is broken now and you cannot fix the code today, the Enable jQuery Migrate Helper plugin from the WordPress.org directory restores the older compatibility layer.
Worked example: a slider that stopped after an update
A site's homepage slider stops after a WordPress update, and the console points at a file in an old slider plugin. Note the file, find the plugin, check for an update, read its changelog for jQuery compatibility and test the update on staging. If the plugin has not been updated for years, pick a maintained replacement, rebuild the slider there and remove the old plugin. If a campaign is running, the migrate helper buys a few days.
How do I check the fix worked, and stop it returning?
Reload with the console open and confirm the error is gone and the feature works. Check other pages that use the same script, test as a logged-out visitor in a private window, clear caches and re-test on a phone.
- Update plugins and themes on a schedule, not only when something breaks. See the maintenance checklist.
- Remove abandoned plugins.
- Test updates on a copy first with the console open.
- Keep a short list of your own custom scripts and what they depend on.
Which fix suits which situation?
| Situation | Best fix |
|---|---|
| A maintained plugin or theme | Update it |
| An abandoned plugin | Replace it with a maintained one |
| Your own custom script | Feature detection in a child theme or custom plugin |
| Site broken now, campaign running | Migrate helper on staging as a dated stopgap |
When to ask for help
An error in one script can hide others behind it. If the fix means editing a theme, or the site is down, ask an engineer or, if it is costing you money now, call for emergency support.
An engineer can find the responsible script.
What does the $.browser error mean?
Some code is calling jQuery.browser, which jQuery removed in version 1.9. Modern WordPress ships a newer jQuery, so the call fails and the script stops.
Link to this answerShould I install a jQuery Migrate plugin?
Only as a short-term bridge while you replace the old code. It restores many removed jQuery APIs, but test on a staging copy, and plan to fix or replace the plugin or theme.
Link to this answerWhy did the error only start after a WordPress update?
Newer WordPress ships a newer jQuery and no longer loads the migrate helper by default, so code that relied on removed features began failing.
Link to this answerIs it safe to edit the plugin file myself?
It works, but the next plugin update will overwrite your change. Fix it in a child theme or custom plugin, or replace the plugin.
Link to this answerHow do I find which file is responsible?
Open the page, then developer tools and the Console tab, and reload. The error shows the script file and line number, and the path tells you which plugin or theme is responsible.
Link to this answerCan I search the code for $.browser?
Yes. From the WordPress root over SSH, grep the plugins and themes folders for .browser in JavaScript files. Expect some harmless matches and look for $.browser and jQuery.browser.
Link to this answerWhat replaces the browser check in my own code?
Feature detection: test what the browser can do instead of which browser it is. Use CSS.supports() for CSS, 'IntersectionObserver' in window for APIs and window.matchMedia for screen sizes.
Link to this answerShould I roll back WordPress or jQuery?
No. That trades a script error for known security problems. Fix or replace the code instead.
Link to this answerHow do I check the fix worked?
Reload with the console open and confirm the error is gone and the feature works. Check other pages that use the same script, test as a logged-out visitor in a private window, clear caches and re-test on a phone.
Link to this answerWhat if the plugin is no longer maintained?
Pick a maintained replacement, rebuild the feature there and remove the old plugin. If a campaign is running, the migrate helper can bridge a few days while you do it.
Link to this answerKeep reading
Want an engineer on it?
Tell us what is wrong in plain words. A person reads it, today.