/ Published in: JavaScript

No iframe-ing the page. Found out twitter doing this. Good practice. (You can not iframe any twitter page)
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head><title>test. no iframe-ing this page</test> </head> <body bgcolor="blue"> <script type="text/javascript"> //<![CDATA[ if (window.top !== window.self) { document.write = "";window.top.location = window.self.location; setTimeout(function(){document.body.innerHTML='';},1); window.self.onload=function(evt){document.body.innerHTML='';}; } //]]> </script> <h1>this is BLUE<br> <? echo $_SERVER["PHP_SELF"] ?> </H1> </body> </html>
Comments
