If anyone knows, I would like to make it so no one can put my iWeb site in an iframe? How do I make my pages automatically break out of iframes?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This answer applies to this question as well:
This code will work if it is placed in the HTML that is referenced inside an
iframe. The way it works is it looks attop(the page you requested that includes aniframe) andselfthe page inside theiframe. If there are different then it changes the top.location to match the URL of theiframe.Here is some ASCII to help understand this
If you request InnerPage.html by itself (not in an iframe) then
top === selfwill evaluate to true, however if you request the same page inside an iframe then the same condition will evaluate as false.