Possible duplicate:How to prevent the loading of a page of my site through the frame of a third-party iFrame site
How can I prevent other users from embedding my webpage in an iframe?
Another solution:
if (window.top !== window.self) window.top.location.replace(window.self.location.href);
With Javascript:
if(window.top==window){ // not in iframe/frame } else { if(parent.parent.someFunction){ parent.parent.someFunction(); } else { alert("parent.parent.someFunction() not defined.") } }
Source: https://habr.com/ru/post/1755265/More articles:How to connect the image to download in Android? - androidDate Conversion - dateDocumentation for mbunit v3 - c #Creating a checkmark-based string in HTML - javascriptСамый простой способ создать таблицу с Zend_Pdf - phpNonSCAID Function (OpenSCManager ()) - c ++Spring RememberMeAuthenticationFilter not running - spring-securityHow to recognize a specific gesture - iphoneHTML, CSS: rounded corners do not have a transparent background in IE - htmlDisable dates older than today in the DatePicker plugin - jqueryAll Articles