Live data from Hacker News

Which loads faster? Pit websites against each other.

whichloadsfaster.com

11–20 of 26 posts

Re: Which loads faster? Pit websites against each other.

#14
post #13

This uses iframes to pit websites against each other. Twitter breaks out of iframes and so do other websites.

Any idea how to prevent this from happening? Google seems to have figured it out in their google images iframes, but I can't for the life of me figure out how they did it.

Re: Which loads faster? Pit websites against each other.

#17
post #13

This uses iframes to pit websites against each other. Twitter breaks out of iframes and so do other websites.

Any idea how to prevent this from happening? Google seems to have figured it out in their google images iframes, but I can't for the life of me figure out how they did it.

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.

#19
post #13

This uses iframes to pit websites against each other. Twitter breaks out of iframes and so do other websites.

Any idea how to prevent this from happening? Google seems to have figured it out in their google images iframes, but I can't for the life of me figure out how they did it.

The brute-force way to do it is to run a proxy on your own server that loads the page in question, strips out either some or all of the javascript, then serves it onward.

Replacing 'top.location' with 'self.location' probably does the trick for 95% of sites.

Post reply on HN