Force hide address bar in Chrome on Android

136,387

Solution 1

Check this has everything you need

http://www.html5rocks.com/en/mobile/fullscreen/

The Chrome team has recently implemented a feature that tells the browser to launch the page fullscreen when the user has added it to the home screen. It is similar to the iOS Safari model.

<meta name="mobile-web-app-capable" content="yes">

Solution 2

window.scrollTo(0,1);

this will help you but this javascript is may not work in all browsers

Share:
136,387
Ranveer
Author by

Ranveer

I work on performance and video calling stuff these days. Twitter: @ranveeraggarwal

Updated on January 12, 2021

Comments

  • Ranveer
    Ranveer over 3 years

    I recently developed a website that fetches mixed http/https content. Due to this, I always get the address bar displayed on top (It doesn't auto-hide like in other websites). Here's what I'm talking about:

    The Website

    This is the link to the website.

    The content is fetched from various sources, hence filtering non-https content is not possible. And since the website is meant for reading, a non-full-screen display is painful for the reader. So, is there a way to force the auto-hide behavior?

    PS: The website uses Twitter Bootstrap, if it helps.
    PPS: I don't want to use the full-screen API, it'll be too heavy for this.

  • sivann
    sivann over 8 years
    what do you mean "add it to the home screen?
  • sivann
    sivann over 8 years
    Found it, it was an option on the chrome menu.
  • Ciro Santilli OurBigBook.com
    Ciro Santilli OurBigBook.com over 8 years
    Note that the user may not be able to restore the address bar afterwards if he wants to: android.stackexchange.com/questions/55659/…
  • David Refoua
    David Refoua about 8 years
    This hack does NOT work on Chrome 49 when the content height is less than the viewport. Tested on Stock Android 5.1.1 Galaxy S6 Edge.
  • Maha Dev
    Maha Dev about 7 years
    I mean is it possible to hide the address bar without creating shortcut on home scree???
  • Michael
    Michael about 3 years
    Now how do I get rid of the title bar across the top of the document that has the document name, URL, and three vertical dots to bring up the menu?