I have just observed that every page has length global variable.
length
What does this variable represent? Is it somehow related to how many iframes/frames are
window.length
Returns the number of frames (either frame or iframe elements) in the window.
frame
iframe
Example
if (window.length) { // this is a document with subframes }
MDN Reference
Note: No part of this answer comes from me. It all comes from the referred source.