Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Hide Browser Address Bar - Android + iPhone
function hideAddressBar()
if(document.height < window.outerHeight)
{ = (window.outerHeight + 50) + 'px';
setTimeout( function(){ window.scrollTo(0, 1); }, 50 );
window.addEventListener("load", function(){ if(!window.pageYOffset){ hideAddressBar(); } } );
window.addEventListener("orientationchange", hideAddressBar );

on my web app i want to hide the address bar on the next page. if i use this code where would i put within my code

does this work still?

Broken in iOS 7 with Safari.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment