If you want to constantly hide the address bar on mobile devices like iPhone, iPad and Android smartphones/tablets, then you have to scroll the window even if the device is turned:
1 2 3 4 5 6 7 8 9 10 | <script type="text/javascript"> function hideAddressBar(){ window.scrollTo(0, 1); } window.onload = hideAddressBar; window.onscroll = hideAddressBar; window.onresize = hideAddressBar; window.onorientationchange = hideAddressBar; </script> |
Short version:
<script> window.onload = window.onscroll = window.onresize = window.onorientationchange = function(){ window.scrollTo(0, 1); }; </script> |