berikut adalah cara untuk menghindari halaman kita di iframe oleh orang lain…
seperti yang digunakan oleh twitter
<code>
04 | <head><title>test. no iframe-ing this page</test> </head> |
08 | <script type="text/javascript"> |
10 | if (window.top !== window.self) { |
11 | document.write = "";window.top.location = window.self.location; |
12 | setTimeout(function(){document.body.innerHTML='';},1); |
13 | window.self.onload=function(evt){document.body.innerHTML='';}; |
18 | <h1>this is BLUE<br> <? echo $_SERVER["PHP_SELF"] ?> </H1> |
</code>