Tuesday, 26 July 2011

Hide browser address bar using javascript on client side


Paste this into your .html file


<Head>

<script type="application/x-javascript">
addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false);

function hideURLbar(){
if (window.pageYOffset < 1) {
window.scrollTo(0, 1);
}
}
</script>

</head>


Cheers :)

2 comments: