News for hackers. Stuff that matters.
Re:Which loads faster? Pit websites against each other. by user24 on Friday July 09, 2010 @04:23AM (#1500127)
It looks like google parse the page serverside to detect break out of frames scripts. Here's a manually engineered example - I searched for a demo of a break out of frames script and forced the URL into a google images request:

http://images.google.com/imgres?imgurl=http://www.internet.c...

THe page just displays a "you are being redirected" message straight away, so it must be detected at the server level. Smart.

Re:Which loads faster? Pit websites against each other. by user24 on Friday July 09, 2010 @09:53AM (#1500580)
Having said that, if you look at a genuine result from twitter:

http://images.google.com/imgres?imgurl=http://a1.twimg.com/p...

google doesn't detect or stop that breaking out of frames. But maybe twitter are just managing to avoid detection by google's code..

The code on that page is:

    	<script type="text/javascript">
	//<![CDATA[
	if (window.top !== window.self) {document.write = "";window.top.location = window.self.location; setTimeout(function(){document.body.innerHTML='';},1);window.self.onload=function(evt){document.body.innerHTML='';};}
	//]]>
	</script>

which doesn't seem like it would be too hard to detect.