Disable JavaScript

To see how your webpage renders and behaves when a browser doesn't have JavaScript support, temporarily turn off JavaScript.

To turn off JavaScript:

  1. To open DevTools, right-click the webpage, and then select Inspect. Or, press Ctrl+Shift+I (Windows, Linux) or Command+Option+I (macOS). DevTools opens.

  2. Press Ctrl+Shift+P (Windows, Linux) or Command+Shift+P (macOS) to open the Command Menu.

    The Command Menu.

  3. Start typing javascript, select Disable JavaScript, and then press Enter to run the command. JavaScript is now disabled.

    Select 'Disable JavaScript' in the Command Menu.

    The yellow warning icon next to Sources reminds you that JavaScript is disabled.

    The warning icon next to Sources.

JavaScript remains disabled in the tab for as long as you have DevTools open.

To see whether the page depends on JavaScript while loading, refresh the page.

To re-enable JavaScript:

  1. Press Ctrl+Shift+P (Windows, Linux) or Command+Shift+P (macOS) to open the Command Menu.

  2. Select the Enable JavaScript command.

Note

Portions of this page are modifications based on work created and shared by Google and used according to terms described in the Creative Commons Attribution 4.0 International License. The original page is found here and is authored by Kayce Basques (Technical Writer, Chrome DevTools & Lighthouse).

Creative Commons License. This work is licensed under a Creative Commons Attribution 4.0 International License.