Reputation: 5685
I am trying to debug the features of a website when users disable their JavaScript. I was wondering how do you disable JavaScript for a page from the Google Chrome DevTools?
Upvotes: 533
Views: 515939
Reputation: 52208
I arrived here simply wanting to know how to disable javascript in chrome:
It's from here
Upvotes: 2
Reputation: 887195
Click the gear icon in the corner of the Developer Tools, click Settings
, then under Debugger
, check Disable Javascript
, as shown in the following video:
Upvotes: 699
Reputation: 403
There's a settings in chrome
open the menu from chrome, click settings > type in "javascript" in the search bar > click site settings > click javascript.
from here you can toggle javascript specifically to a site using their url. or just click the big button to allow/block it to all sites.
Upvotes: 0
Reputation: 681
This extension makes it faster (I am the author) : Quick Javascript Switcher
It is open source: https://github.com/maximelebreton/quick-javascript-switcher
Upvotes: 20
Reputation: 4297
Update August 2020
Original answer
Upvotes: 217
Reputation: 743
good question, i try so many way, but it is curry and boring, until i find shortcut.
only two shortcut, but i think safari is more convenient for that.
Upvotes: 0
Reputation: 917
This is the latest setting for the windows
Settings > Advanced > Privacy and security > Site Settings > Javascript > Blocked then get switch on and off
Upvotes: 0
Reputation: 25897
Official documentation: Disable JavaScript With Chrome DevTools
There's now a command menu built into DevTools that makes it easier to disable JavaScript. This has been around as of April 2016 or so.
Disable JavaScript
(or some version of that... it's a fuzzy search) and then press Enter.Use the Enable JavaScript
command when you want to turn it back on.
Upvotes: 112
Reputation: 875
Press F8 for temporarily freezing / unfreezing JS (with DevTools open).
This is very useful for debugging UI issues on elements that may lose focus if you click or press anything outside of that element. (Chrome 71.0.3578.98, Ubuntu 18.10)
Upvotes: 2
Reputation: 14155
The first way
⋮
button in the top right corner of the Developer Tools, then click Settings
in the menu.Then you have to scroll down the settings window to bottom and then you will see the checkbox for disabling JavaScript like follows:
Just click on this checkbox and push esc key on keyboard for hide the settings. If you want to enable it then you have to do the same way again.
The second way
If all this does not work
For some reason it is possible that it does not work. I this case open a new empty site in "Incognito Mode" and do all this there.
The quickest way
In Chrome Web Store or on Opera Addon site you can find and install extensions which do it per one click. Just search "Javascript Switcher"
:
Upvotes: 3
Reputation: 3042
The fast way:
1) just click on CTRL + SHIFT + P
2) fill the field by the 3 letters dis and will appear this box and select the item Disable Javascript
that's all folks!
Upvotes: 4
Reputation: 784
Upvotes: 3
Reputation: 548
The quickest way is problably this one:
Upvotes: 11
Reputation: 1166
Paste it: chrome://settings/content
Go to "Javascript" section and disable it.
Upvotes: 1
Reputation: 1047
To temporarily block JavaScript on a domain :
View site information
)JavaScript
, select Always block on this site
Upvotes: 3
Reputation: 39354
Using only the keyboard at least for Windows 10:
Upvotes: 6
Reputation: 179
Chrome://chrome/settings/Privacy/Content settings/JavaScript
and there you can PASTE your website's URL in Manage exceptions..
and change the JavaScript priority from ALLOW to BLOCK.
Upvotes: 0
Reputation: 1367
The gear icon is no longer part of developer tools. Since Chome 30.0 it is not even possible to bring it back (In Google Chrome Developer Tools, the toolbar icons disappeared. What gives?)
Upvotes: 3
Reputation: 1885
On OSX, I had to click the triple vertical dots, and uncheck a box in the settings section. Which can also be opened with f1
Upvotes: 7
Reputation: 9377
On Mac OS X:
The Chrome Quick JavaScript Switcher extension is a lot easier though :-)
Upvotes: 3
Reputation: 12308
You can also run Chrome with JavaScript disabled by default by using the flag:
-disable-javascript
You would use this for example by running Chrome like this:
C:\Documents and Settings\%username%\Local Settings\Application Data\Google\Chrome" -disable-javascript
Upvotes: 12