Call page.isJavaScriptEnabled() on a Puppeteer Page. It returns true when JavaScript is enabled and false when it is disabled.
Check the JavaScript setting on a page
Once you have a Puppeteer Page, read its setting directly:
const enabled = page.isJavaScriptEnabled();
console.log(enabled); // true or false
The method returns a boolean; it does not need await. See the official Page.isJavaScriptEnabled() reference.
Complete example: inspect and disable JavaScript
This example checks the initial setting, disables JavaScript, navigates to a page, and checks the setting again:
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problems#1 Best Overall
import puppeteer from 'puppeteer';
const browser = await puppeteer.launch();
const page = await browser.newPage();
console.log(page.isJavaScriptEnabled());
await page.setJavaScriptEnabled(false);
await page.goto('https://example.com');
console.log(page.isJavaScriptEnabled());
await browser.close();
The value read by isJavaScriptEnabled() reports the page’s setting. The API does not promise that a particular site will work correctly with JavaScript on or off.
Change the setting at the right time
Use await page.setJavaScriptEnabled(true) to enable JavaScript or await page.setJavaScriptEnabled(false) to disable it. The setter returns a promise, so await it when changing the setting.
Rank #2
Set the option before navigating if it should apply to the page load. Puppeteer’s setter documentation says the change takes full effect on the next navigation and does not affect scripts that have already run. If the page has already loaded, changing the setting will not rewind its execution; navigate again for the new setting to take effect. See the setter reference.
Why page.evaluate() is not the setting check
page.evaluate() executes code in the page context. It can check whether a particular expression runs, but it is not the documented method for reading Puppeteer’s JavaScript-enabled setting. For that setting, use page.isJavaScriptEnabled(). Read about JavaScript execution in Puppeteer.
Troubleshooting
- The method says JavaScript is enabled, but the site looks broken: the method reports the setting, not whether the site’s scripts completed successfully. Check the page’s loading behavior separately.
- Scripts ran before JavaScript was disabled: changing the setting does not undo prior execution. Navigate again after setting it.
- You used
evaluate()to check the setting: switch topage.isJavaScriptEnabled();evaluate()runs a page-context expression rather than querying this Puppeteer setting.
Or skip the browser setup
If your goal is to obtain a website screenshot rather than inspect Puppeteer’s JavaScript setting, ScreenshotNeo provides a screenshot API and MCP server. One GET request can return a PNG, JPEG, WebP, or PDF; its setting is not a replacement for Puppeteer’s page-state API.
For example, using cURL:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
See the ScreenshotNeo API documentation for setup and options. Before capture, it accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and responses indicate the page verdict and billing status in headers. An MCP server offers take_screenshot, get_page_info, and capture_pdf for AI agents and MCP clients.
The free plan includes 1,000 screenshots per month with no card required; paid plans start at $5 for 3,000 screenshots. Sign up for ScreenshotNeo’s free plan.
Quick Recap
Best Value
Rank #4
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




