Home
» WEB
»
How to Disable JavaScript in Chrome for One Tab or a Site
How to Disable JavaScript in Chrome for One Tab or a Site
To disable JavaScript in Chrome for one tab, open DevTools, press Ctrl+Shift+P on Windows or Linux (or Command+Shift+P on Mac), search for Disable JavaScript, and press Enter. Keep DevTools open: Chrome keeps JavaScript disabled in that tab only while DevTools is open. For a longer-lasting block, change the JavaScript permission for one site or set a browser-wide default.
The DevTools method is useful for testing a page or checking whether a feature depends on JavaScript. It is not a reliable way to get rid of every sign-in prompt or pop-up, and turning JavaScript off can make websites harder to use.
Temporarily disable JavaScript in one Chrome tab
These steps apply to desktop Chrome. They do not change the setting in every tab or create a permanent browser preference.
Open the page and launch DevTools. On Windows or Linux, press Ctrl+Shift+I. On Mac, press Command+Option+I. You can also open Chrome’s three-dot menu and choose More tools > Developer tools. DevTools can be docked beside or below the page; either layout works.
Illustration of the Chrome menu route to Developer tools.
Open the Command Menu. With DevTools focused, press Ctrl+Shift+P on Windows or Linux, or Command+Shift+P on Mac. The Command Menu belongs to DevTools; if the shortcut does not open it, click inside DevTools and try again.
Run the disable command. Type javascript, select Disable JavaScript from the results, and press Enter. If more than one result appears, choose the command with that exact name.
Illustration of the DevTools command used to disable JavaScript.
Reload the page while DevTools stays open. Reloading lets the page load again without running JavaScript, which is useful when you are checking what scripts affect during startup. Chrome shows a disabled-JavaScript indicator near the address bar and a warning next to Sources in DevTools.
Illustration of the disabled-JavaScript indicator and Sources warning.
The setting follows the current tab while DevTools remains open. If you navigate to another page in that tab, JavaScript remains disabled there too. Opening a separate tab does not apply the DevTools change to that new tab.
Block JavaScript for one site or set a default
Use Chrome’s site permissions if you want the restriction to remain in place after closing DevTools. Chrome lets you change permissions for an individual site without changing the default for other sites.
Block it for one website
Open the site in Chrome, select the site information icon to the left of its address, then choose Site settings. Find JavaScript and set the permission to Block. Chrome saves site-setting changes automatically. Reload the page to apply the new permission. To restore the site, return to the same setting and allow JavaScript again, or reset the site’s permissions.
Change the default for websites
To block JavaScript broadly on desktop Chrome, open the three-dot menu and go to Settings > Privacy and security > Site settings > JavaScript. Choose Don’t allow sites to use JavaScript. This changes the default for websites, so pages that rely on scripts may not work. You can return to this screen and allow JavaScript again. A site-specific permission can be set separately from the default.
Illustration of Chrome’s JavaScript setting for the browser default.
Chrome’s menu wording and layout can vary slightly across releases, but the JavaScript control remains under Site settings. Google’s Chrome site-permissions guide covers both the default and individual-site settings.
Should you turn JavaScript off to stop pop-ups?
Usually, no. JavaScript powers interactive parts of websites, including forms and games, and disabling it may also stop sign-in flows, menus, embedded media, or checkout controls from working. Some pages may still show prompts or open windows through other browser features, so disabling scripts is not a dependable pop-up blocker.
If you only want to block unwanted pop-up windows or redirects, use Chrome’s Pop-ups and redirects permission instead: open Settings > Privacy and security > Site settings > Pop-ups and redirects, then choose a default or adjust one site. Chrome blocks pop-ups by default, and its pop-up settings guide explains how to manage exceptions. Notification messages are a separate permission and can be blocked separately.
Turn JavaScript back on
For the temporary DevTools change, reopen the Command Menu and run Enable JavaScript, or simply close DevTools. Chrome’s documented DevTools workflow keeps JavaScript off only in the current tab while DevTools is open; closing it restores JavaScript. If you changed a site or browser default in Settings, go back to the JavaScript permission and allow sites again. For more detail, see Chrome’s DevTools instructions for disabling JavaScript.