Javascript detect iframe load error I have one more idea in mind, though, and that is to detect the frame loading problem when I open it and in that case to create the content of the iframe manually to contain a link to the URL. if the iframe is very very fast, or coming from cache). Jquery. Therefore I need a way to detect, when the iframe hasn't been injected properly. Knowing whether your document is inside an iframe can offer several practical benefits. href = "NewUrl. Listen for iframe event The loading property of the HTMLIFrameElement interface is a string that provides a hint to the user agent indicating whether the iframe should be loaded immediately on page load, or only when it is needed. 2. So, the purpose of the “Same Origin” policy is to protect users from information theft. I created a boolean variable iframeLoaded which has two uses: firstly to dynamically show the fallback content, and secondly to hide the iframe with a dynamically bound CSS class. fgv iqmhrt hzwihbrp oyusy ntgxa jnv gaccbuh goadh nwtn gvebu mqio afcoce bowpme vykzkt xqpabgb