How can I find out that my page is embedded as a frame to other site during page loading? I guess referrer request header can’t help me here? Thanks.
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.
You cannot check it from the server’s side, but you can use javascript to detect it after the page has loaded. Compare
topandself, if they’re not identical, you are in a frame.Additionally, some modern browsers respect the
X-FRAME-OPTIONSheader, that can have two values:Users include Google’s Picasa, that cannot be embedded in a frame.
Browsers that support the header, with the minimum version: