Web app: hide address bar without delay and page jump
I am creating a web app and use this code to hide the address bar:
window.addEventListener("load",function() {
setTimeout(function(){
window.scrollTo(0, 1);
}, 0);
});
It does work, but there is always a slight delay, which means that you
first see the page with the address bar and then the address bar
disappears and the page moves up "jumps". This also happens with every
internal navigation, which I actually find to be more annoying than just
scrolling the address bar away myself.
Any workarounds? I have just tried on iPhone safari so far. I also tried
<meta name="apple-mobile-web-app-capable" content="yes">
which did nothing.
No comments:
Post a Comment