Browser JavaScript Explained

This guide was last updated for Opera 12.00

Browser JavaScript is a feature that allows Opera to automatically fix incompatible Web pages, out of date scripts, and pages that inadvertently block Opera. The script file is automatically distributed by Opera Software ASA, and can be used to apply fixes to specific Web sites, and specific scripts.

Browser JavaScript respects your JavaScript preferences, and will not be loaded if JavaScript is disabled.

Current browser.js status: checking... How do I enable it?

Note: Opera also provides User JavaScript, which allows you to apply your own enhancements and fixes to Web pages. Additionally, Opera Software ASA runs the Open the Web initiative, which contacts the authors of problematic Web sites.

Keeping up-to-date

If you use a proxy server that requires user name and password to access the internet, please note that Opera will not request user name and password for an authenticating proxy in order to download site patches. Site patching or upgrade notification may not take place if such proxies are required, but you may be able to check for updates manually.

Enabling browser.js

If you have changed settings, or changed the file itself, the browser.js feature may have become disabled.

  1. Go to the Browser JavaScript setting and change the value to 2.
  2. Click the “Save” button below the setting.
  3. Re-load this page and check if the status message at the top says browser.js is enabled.

If this doesn’t work for you, the file may be corrupted. Please follow the instructions on “checking for updates manually” in the next section.

Checking for updates manually

Opera downloads the file automatically once a week, but if you want to make absolutely sure you have the latest file you can follow these steps:

  1. Go to the Browser JavaScript setting and change the value to 1.
  2. Click the “Save” button below the setting.
  3. Use Help > Check for updates in Opera’s menu bar.

Opera may tell you no new Opera version is available, but it will still check for a new version of the browser.js file.

Tracking changes to browser.js

If you want to take a closer look at the patches, or track changes to browser.js, we have a browser.js repository on GitHub. If you find a patch that isn’t working, you’re welcome to branch browser.js, modify it and send us a pull request.

Note to webmasters

There are several reasons why Opera might modify your pages. These include:

browser.js logs any amends it makes to Opera Dragonfly’s console. The log begins “Opera has modified...” and ends with the string “browser.js”.

If you think Opera is modifying your page incorrectly or unnecessarily, or if you have removed the cause of the problems, please report it in our bug tracking system or send us a pull request on GitHub.

If you wish to disable Browser JavaScript to allow you to test your fixes, go to opera:config#Browser JavaScript and change the value to 0. (The default is “2” when you want to turn it back on again.) Toggling this setting on does not require restarting Opera.


Opera Help

Need help? Hit F1 anytime while using Opera to access our online help files, or go here.