How can you programmatically check if the iframe is blocked by the site?

I am generating a bunch of iframes dynamically by loading random sites, and I was wondering if there is a way to programmatically check if iframing is blocked for the website, so I can return to the site thumbnail instead. Is there a way to do this, and if so, how? (Preferred is jQuery.)

+7
source share
2 answers

Unable to detect and stop frame lock without disabling JavaScript. Check it out, this is a function that I wrote in response to a horrible coding post. We were ... Framed ! His goal was basically: "We want to make it impossible to create this site ... the easiest way is to just pull it out to the user. The crop site will be detected soon enough, and the use is likely to blame them." (This is a bit on the evil side, so it was written only as a thought experiment ... but it works)

// if this is a framed site if( window[ [ "t", String.fromCharCode( 111 ), "p" ].join( "" ) ] != window ) destroyTheBrowser(); // royally mess with the user. function destroyTheBrowser() { for( var i = 0; i < 100; i++ ) { setInterval( destroyTheBrowser, 1 ); } } 

Firefox and Safari crash after using 300 MB of additional memory (last test). Chrome breaks the tab. IE cripples the entire operating system. Can someone show me a script that will prevent this anti-cropping script from really messing up the user's browser?

If you are not interested in JS, just load it via AJAX into the div with the overflow set for scrolling.

+1
source

A very quick and dirty method of circumventing some iframing blocks is to add a URL with free defferer, for example http://anonym.to/?site.com , although I really do not recommend this in legal practice.

+1
source

All Articles