How to enable JavaScript
Most modern browsers enable JavaScript by default. However, here's an overview of how to enable/disable JavaScript if required.
To view webpages with JavaScript, you need to ensure your browser has JavaScript enabled. Generally speaking, you can still view the webpage without JavaScript, but you will not be able to take advantage of the JavaScript functionality.
When testing any web page that you develop, it's a good idea to disable JavaScript periodically to see how the page appears and behaves without JavaScript. This will show you how it will be displayed to users with JavaScript disabled.
However, to test that the actual JavaScript code works properly, you will need to ensure that it's enabled.
How do I check if my browser has JavaScript enabled?
You normally do this by checking your browser's options/preferences/settings. This will depend on the browser you're using. Instructions for some of the more common browsers are below:
Mozilla Firefox
- Type about:config into the address bar
- Click I'll be careful, I promise
- Using the search bar at the top, search for javascript.enabled. This should return the entry you're looking for.
- Right-click on javascript.enabled and select Toggle. You can also double-click it if you prefer.
Google Chrome
- Go to Chrome from the top menu
- Select Preferences...
- Click on Show advanced settings... Click on Content Settings...
- Ensure that the Allow all sites to run JavaScript (recommended) option is selected
- Click OK
Apple Safari
- Go to Safari from the top menu
- Select Preferences
- Select Security
- Ensure that the Enable JavaScript option is checked
- Click OK
Opera
- Go to Opera from the top menu
- Select Preferences
- Select Websites from the left menu bar
- Ensure that Allow all sites to run JavaScript (recommended) is checked
Internet Explorer
- Go to Tools from the top menu
- Select Internet Options
- Click on the Security tab
- Ensure that the Internet zone is selected
- Click Custom Level
- Scroll down until you see the Scripting section
- Ensure that the Active Scripting option is set at Enable
- When the Warning! window asks Are you sure you want to change the settings for this zone? click Yes
Microsoft Edge
For Microsoft Edge on Windows 10, you need to disable JavaScript from the Windows Group Policy Editor, rather than in the browser settings.
You can access the Windows Group Policy Editor by searching for Edit Group Policy in the Windows Taskbar, then navigate to the appropriate setting via the left navigation pane.
Depending on your browser, the exact steps may differ slightly from above. Having said that, the above steps should point you in the right direction.
Note that you may need to refresh the page after enabling JavaScript before you see the effect.
How do I disable JavaScript?
You simply go through the steps above but ensure the JavaScript options are not checked/selected.
If you're developing web pages with JavaScript, it's good practice to view your website with JavaScript disabled. This will show you what your website will look like to users who choose to disable JavaScript.
Other browsers?
Most (if not all browsers) give you the option to enable/disable JavaScript. If your browser is not listed above, the steps above will give you some idea of how to find it. Just look for something called tools, options, preferences or something similar.
Warning
Java and JavaScript are two different things — make sure you're enabling/disabling the right option!