Re:Simulating Website Thumbnails Using Iframes
by rossta on Monday January 18, 2016 @01:30PM
(#10925950)
I believe a caveat with this technique is that it won't work for sites that send the X-Frame-Options header as SAMEORIGIN in supporting browsers.
[ Parent
| on HN ]
Re:Simulating Website Thumbnails Using Iframes
by tomhallett on Monday January 18, 2016 @01:45PM
(#10926035)
Agreed. Another caveat: this technique won't work if the website has iframe busting javascript code.
The iframe will reset the source of the top level page and will cripple your app.
If you control the domains you are embedding this won't be a problem, but if you don't - then it's a risk to be aware of.
Re:Simulating Website Thumbnails Using Iframes
by leonkenneth on Monday January 18, 2016 @02:40PM
(#10926401)
If your target browsers support it, you can use the `sandbox` attribute and avoid supplying the `allow-top-navigation` flag to prevent this behaviour.
Granted, this won't prevent other framebusting techniques such as checking the parent before rendering.