No iframe my page !
berikut adalah cara untuk menghindari halaman kita di iframe oleh orang lain…
seperti yang digunakan oleh twitter ;)
<!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>




recent comment