Why you might want to disable JavaScript

JavaScript is code that runs inside your browser when you visit a website. It powers interactive features like dropdown menus, live chat boxes, and auto-playing videos. Disabling it stops all that code from running, which can make some websites faster, block certain ads, or prevent tracking scripts from following you across the web.

The tradeoff is real: many modern websites need JavaScript to work at all. You might see blank pages, broken buttons, or login forms that don't function. Most people don't disable JavaScript permanently — they turn it off for specific sites where they don't need the features, or they use browser extensions that block only certain scripts instead of all of them.

Key Takeaways

  • You can disable JavaScript entirely in your browser settings, but this breaks many websites and is rarely necessary.
  • Chrome, Firefox, Safari, and Edge all have JavaScript settings, though Chrome and Edge make it harder to find than Firefox does.
  • Browser extensions like uBlock Origin or NoScript let you block JavaScript on specific sites without turning it off everywhere.
  • Disabling JavaScript won't stop all tracking or ads — many work through other methods that don't require JavaScript.
  • If you disable JavaScript and a website stops working, you can turn it back on for just that site in your browser settings.

Disable JavaScript in Firefox

Firefox makes this the easiest of all browsers. Type about:config into the address bar and press Enter. You'll see a warning page — click "Accept the Risk and Continue." In the search box that appears, type javascript.enabled. You'll see one result with a toggle switch on the right side. Click the toggle to turn it off.

To turn JavaScript back on for a single website, right-click anywhere on the page, select "Inspect," then click the "Console" tab at the top. Type javascript.enabled = true and press Enter — but this only works for that one tab. To re-enable it everywhere, go back to about:config and toggle it back on.

Disable JavaScript in Chrome or Edge

Both Chrome and Edge use the same process because Edge runs on Chromium, the same engine as Chrome. Open your browser settings by clicking the three-line menu in the top right corner and selecting "Settings." Go to "Privacy and security" on the left side, then click "Site settings."

Scroll down and click "JavaScript." You'll see a toggle at the top that says "Allowed (recommended)" — click it to switch to "Not allowed." From this point on, JavaScript is disabled on all websites. If a site doesn't work, you can come back to this same page and add that specific website to the "Allow" list instead of blocking it everywhere.

Disable JavaScript in Safari

Safari doesn't have a simple on-off switch for JavaScript in the main settings. Instead, open Safari and click "Safari" in the menu bar at the very top of your screen. Select "Settings," then click the "Security" tab. You'll see a checkbox that says "Enable JavaScript" — uncheck it to disable JavaScript on all websites.

Safari will ask you to confirm. Click "Disable" in the popup that appears. To turn it back on, follow the same steps and check the box again. Unlike Chrome and Firefox, Safari doesn't let you disable JavaScript for only certain sites without using a third-party extension.

Use browser extensions instead of disabling JavaScript entirely

If you want to block scripts on some sites but not break others, a browser extension is usually the better choice. uBlock Origin is free and works on Firefox, Chrome, and Edge. It blocks ads and tracking scripts by default, but leaves most websites functional. NoScript is more aggressive — it blocks all JavaScript by default and makes you click to allow it on each site you visit.

To install either one, go to your browser's extension store (Chrome Web Store, Firefox Add-ons, or Edge Add-ons), search for the name, and click "Add to [Browser]." Both extensions show an icon in your toolbar that you can click to see what scripts are running on the current page and toggle them on or off individually. This gives you much finer control than a global on-off switch.

What happens when JavaScript is disabled

Websites built in the last five years often won't load at all without JavaScript — you'll see a blank page or a message saying "Please enable JavaScript." Older sites and simple pages like news articles or documentation usually work fine. Interactive features like autocomplete search, infinite scroll, live notifications, and video players often break or disappear.

Disabling JavaScript won't stop all tracking or ads. Many websites track you through other methods like cookies, server logs, and pixel tags that work without any JavaScript running. If your goal is privacy, disabling JavaScript is only one small piece — using a VPN, blocking cookies, or using a privacy-focused browser extension will have a much bigger effect.

Re-enable JavaScript if you need it back

If you disabled JavaScript globally and now a website you need won't work, the fastest fix is to turn it back on. In Firefox, go back to about:config and toggle javascript.enabled back on. In Chrome or Edge, go to Settings > Privacy and security > Site settings > JavaScript and toggle it back to "Allowed." In Safari, go to Settings > Security and check the "Enable JavaScript" box.

If you want to keep JavaScript off globally but allow it on one specific site, you don't need to turn it back on everywhere. In Chrome and Edge, go to the JavaScript site settings page and click "Add" under the "Allow" section, then type the website address. In Firefox, you can use an extension like "Toggle JavaScript" to manage per-site settings more easily than editing about:config each time.

Frequently Asked Questions

Will disabling JavaScript make my browser faster?

Slightly, but probably not noticeably. JavaScript does use CPU and memory, but modern browsers are efficient at running it. You'll see a bigger speed improvement from blocking ads and tracking scripts with an extension like uBlock Origin than from disabling JavaScript entirely. The real slowdown on most websites comes from large images and video, not JavaScript.

Does disabling JavaScript protect me from viruses?

It reduces one attack surface, but it's not a security strategy by itself. Viruses and malware can spread through other methods — malicious downloads, email attachments, or compromised plugins. If you're worried about security, keep your browser and operating system updated, use a password manager, and be careful what you download. Disabling JavaScript is a side benefit, not a solution.

Can websites tell if I have JavaScript disabled?

Yes, they can detect it immediately. Many websites show a message like "This site requires JavaScript to be enabled" when they notice it's off. Some sites will redirect you to a simpler version that works without JavaScript, while others simply won't load. There's no way to hide the fact that JavaScript is disabled.

What's the difference between disabling JavaScript and using an ad blocker?

Disabling JavaScript stops all code from running, which breaks many websites. An ad blocker like uBlock Origin only blocks specific scripts and resources that serve ads or track you, so most websites still work normally. Ad blockers are more practical for everyday use because they give you the privacy and speed benefits without breaking functionality.

If I disable JavaScript, will my passwords and logins still work?

Most login forms will still appear and let you type, but the submit button might not work because it relies on JavaScript. Some sites have fallback methods that work without JavaScript, but many don't. If you need to log into a site regularly, it's better to disable JavaScript only for that site or use an extension that lets you toggle it per-site instead of globally.