Hiding the address bar of a browser (popup)

Javascript

Javascript Problem Overview


I have to hide the address bar of a browser. I am using this code:

var winFeature =
        'location=no,toolbar=no,menubar=no,scrollbars=yes,resizable=yes';
window.open('Result.html','null',winFeature);  

In many solutions, just the location=no attribute can hide the address bar (in both IE & Chrome). However, this didn't work for me (even in IE & Chrome).

Finally, I found a MSDN article that describes how location=no simply hides the back/forward/stop navigation buttons, and makes the address bar read-only.

Is there any solution to hide the entire address bar by ignoring above MSDN article? I am testing in IE and Google Chrome.

Javascript Solutions


Solution 1 - Javascript

> What is the truth?

Microsoft's documentation describing the behaviour of their browser is correct.

> Is there any solution to hide the addressbar?

No. If you could hide it, then you could use HTML/CSS to make something that looked like a common address bar. You could then put a different address in it. You could then trick people into thinking they were on a different site and entering their password for it.

It is impossible to conceal the user's location from them because it is essential for security that they know what their location is.

Solution 2 - Javascript

This is no longer possible in modern browsers due to security restrictions.

Official(-ish) Sources:

  • Firefox

    > In Firefox 3, dom.disable_window_open_feature.location now defaults to true, forcing the presence of the Location Bar much like in IE7. See bug 337344 for more information.

  • Internet Explorer 7 and later

    > In Internet Explorer 6, location specifies whether to display the Address Bar.

    (Implying the behaviour ends with IE6)

  • Chrome/Chromium

    > Those toolbar hiding parameters are ignored in Chrome. You will also notice that modern browsers are moving towards not hiding it as security / anti phishing measures. Also see https://bugzilla.mozilla.org/show_bug.cgi?id=337344

Solution 3 - Javascript

Looking for the same, the only thing I'm able to do is

Launch Google Chrome in app mode

Chrome.exe --app="<address>"

From the run prompt. Example:

Chrome.exe --app="http://www.google.com"

Hide the address bar in Mozilla Firefox

Type about:config in the address bar, the search for:

dom.disable_window_open_feature.location

And set it to false

So, when you open a popup window, it will launch with the address bar hidden. For example:

window.open("http://www.google.com",'','postwindow');

Firefox without location bar

Chrome in app mode

Now, I'm looking to do something similar with Microsoft Edge, I have not found anything yet for this browser.

Solution 4 - Javascript

It's different in every browser.

Some years ago, what you tried, was right. But nowadays it is regarded as a security risk by browser vendors that one cannot see the browsers address bar (for phishing reasons) and so they (or most of them) made the decision to always show the browser address bar. Which is good in my eyes.

Solution 5 - Javascript

Its not possible to hide address bar of browser.

Solution 6 - Javascript

There is no definite way to do that. JS may have the API, but the browser vendor may choose not to implement it or implement it in another way.

Also, as far as I remember, Opera even provides the user preferences to prevent JS from making such changes, like have the window move, change status bar content, and stuff like that.

Solution 7 - Javascript

You might no be able to HIDE it, but if you are looking for the extra space, what I did and seems to work is a very simple thing, the address bar has 60px height, so this is my solution.

@media only screen and (max-width: 1024px){ // only from ipads down
  body{
    padding-bottom: 60px; // push your whole site same height upwards. ;)
  }
}

Solution 8 - Javascript

you can do it with visual Basic, put a Webbrowser control on the form, load an html that opens a popup with Location=no and it will open a new browser without address bar. Probably not what you are looking for but just thought throw it in :)

Solution 9 - Javascript

In the Edge browser as of build 20.10240.16384.0 you can hide the address bar by setting location=no in the window.open features.

Solution 10 - Javascript

This is how I do it for popups, though it is only working with IE11, not Chrome- haven't tested in Firefox.

window.open(url, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no');

Solution 11 - Javascript

You could make the webpage scroll down to a position where you can't see the address bar, and if the user scrolls, the page should return to your set position. In that way, Mobile browsers when scrolled down , will try to guve you full-screen experience. So it will hide the address bar. I don't know the code, someone else might put up the code.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionSurendra JnawaliView Question on Stackoverflow
Solution 1 - JavascriptQuentinView Answer on Stackoverflow
Solution 2 - JavascriptPekkaView Answer on Stackoverflow
Solution 3 - JavascriptGTRONICKView Answer on Stackoverflow
Solution 4 - JavascriptyunzenView Answer on Stackoverflow
Solution 5 - Javascriptuser3040206View Answer on Stackoverflow
Solution 6 - JavascriptJosephView Answer on Stackoverflow
Solution 7 - JavascriptT04435View Answer on Stackoverflow
Solution 8 - JavascriptCyberlexView Answer on Stackoverflow
Solution 9 - JavascriptDan RansomView Answer on Stackoverflow
Solution 10 - Javascriptkrmarshall87View Answer on Stackoverflow
Solution 11 - JavascriptbrvnbldView Answer on Stackoverflow