Skip to Content
Platform.Ontology

DevTools open detection

Heuristics that guess when the browser developer tools are open.

Gets silentlyDevice detailsBrowser stateWeb browsersWhen the page loadsWhile you use it

In one line

Can guess when your browser developer tools are open, but often gets it wrong

Heuristics that guess when the browser developer tools are open.

Used by anti-scraping and anti-cheat code. Methods: window outer minus inner size over about 160 px, console getter traps, debugger timing. Easily false-positive when docked or zoomed.

What it can and can't do

What the user does: Nothing. It runs in the background while the page is open

It can

  • Guess from window size changes that a side panel is open
  • Use timing and console tricks to spot open tools
  • Block content or end a session when it thinks tools are open
  • Flag you as a possible scraper or cheater

It cannot

  • Work on iPhone or Chrome on Android
  • See what you do inside the tools
  • Be sure; docked panels and zoom cause false alarms
  • Stop you from closing the tools

How it differs between platforms: Works on desktop Chrome, Edge, Firefox, and Safari. It does not work on iPhone or Chrome on Android.

Browser support

BrowserStatusFirst versionReleasedNote
ChromeSupported12008-12-11None
EdgeSupported122015-07-29None
FirefoxSupported12004-11-09None
SafariSupported12003-06-23None
Safari on iPhoneNot supportedNot availableNot listedNone
Chrome on AndroidNot supportedNot availableNot listedNone
Samsung InternetSupported1.02013-04-27None

How a site asks for it

APIouterWidth - innerWidth, console.log getter, debugger timing
How access is grantednone
What the user seesNone
Needs a secure context (HTTPS)No
Needs a user gestureNo
How long it lastsread fresh on every page load; nothing stored
How to take it backnone needed (no grant)
Inside an iframeReadable from cross-origin iframes too (same values)

Typical flow

  1. Page script reads the value
  2. No prompt is shown

Data you get

Shape: object
How often: static per session

FieldTypeUnitRangePrecision
devtoolsOpenbooleanNoneinferredheuristic

Technical limits

  • No standard API
  • Mobile browsers have no devtools signal

The story

What it is

Guesses whether you have the browser's developer tools open.

For you

You never see it. You may notice a page that suddenly goes blank, redirects away or freezes when you press F12. It can also fire by mistake if your window is oddly sized.

For makers

Sites that fear scraping, cheating or copying want to know when someone inspects the code. They react by hiding content, adding delays or flagging the visit. It is easy to fool, but common in anti-bot and game protection.

Where you see it

TypeExampleApps
gamesA browser game with paid items blanks the screen if the developer tools are open, to stop people editing score or coins.None named
securityAn anti-scraping script sees the tools open and serves empty data to the visitor.PerimeterX, DataDome
mediaA streaming page pauses playback when it thinks someone is capturing the video stream.None named
educationAn online exam page flags students who open developer tools during a timed test.None named
shoppingA ticket sale page ends the session when it sees tools open during a drop, as a bot defence.None named
developerA tool maker uses the same check to show debug info only when developer tools are open.None named
adsAn ad verification script avoids sending data when it detects a person inspecting it.None named

Risks

  • False alarms for curious people
  • Used to hinder security research

Good uses and abuse

Legitimate uses

  • Anti-scraping

Known abuse

  • Chilling inspection

Scores

ScoreValueMeaning
Sensitivity1 of 5How revealing the data is
Utility2 of 5How useful it is to honest apps
Friction0 of 5How much the user has to do
Fingerprint bits0.3Rough identifying entropy, when known

Sources

How well checked: Inferred from related behavior.

On this page