Iframe Detector Demo
This page demonstrates how the iframe detector works when it is loaded inside an iframe. The content below is the same detector component, but now embedded inside an iframe.
Back to DetectorHow It Works
The detector uses JavaScript's Window.parent property to determine if a page is running inside an iframe. It checks if the current window is different from the top-level window and counts how many levels of nesting exist.