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.
self, if they’re not identical, you are in a frame.
Additionally, some modern browsers respect the
X-FRAME-OPTIONS header, that can have two values:
- DENY – prevents the page from being rendered if it is contained in a frame
- SAMEORIGIN – same as above, unless the page belongs to the same domain as the top-level frameset holder.
Users include Google’s Picasa, that cannot be embedded in a frame.
Browsers that support the header, with the minimum version:
- IE8 and IE9
- Opera 10.50
- Safari 4
- Chrome 184.108.40.2062
- Firefox 3.6.9 (older versions with NoScript)
Answered By – Maerlyn
This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0