Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Joe Morello
1,734 PointsThe iframe on my website does not load
When I load my website in Google Chrome, I have plugins youtube I twitter and Facebook but the only thing that gives me trouble is Facebook not load, what is the problem.
this is the code:
<div class="grid1_of_4">
<h3>Facebook</h3>
<iframe src="//www.facebook.com/plugins/likebox.php?href=https%3A%2F%2Fwww.facebook.com%2FFacebookDevelopers&width&height=290&colorscheme=light&show_faces=true&header=true&stream=false&show_border=true" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:290px;" allowTransparency="true"></iframe>
</div>
2 Answers
Jason Cook
11,501 PointsYou cannot load Facebook into an iframe. They include a X-Frame-Options header to DENY this type of access. This is done essentially for security purposes to prevent possible masquerading by external sites. If you view source on Facebook, you will see they use a header such as the following to prevent such inclusions.
<meta http-equiv="X-Frame-Options" content="DENY" />
I hope this helps.
Joe Morello
1,734 PointsWhen the website is in the server function good! check this out, http://www.artplaceestudio.com/casasosatest/index.html but in firefox and IE the header is bad....why?
Joe Morello
1,734 PointsJoe Morello
1,734 PointsHow I can paste the code here? maybe I can show you the code and help me, X-frame-options FAILED.