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.
Answer from Quentin on Stack OverflowWhat 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.
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
Location=no but still i see addressbar - JavaScript
Open new popup window without address bars in firefox & IE - Stack Overflow
Hide the browser address bar - JavaScript
opening a new window and hiding the addressbar and ...
location is the window feature you want to set to no or 0 to hide the address bar.
Opinionated Advice: You can't rely on popups showing because most people have popup blockers installed to curb abuse, so if you can get away with it, don't use a pop up at all! Use something like the jQuery UI Dialog plugin.
Example:
window.open("http://www.mydomain.com/mypage.htm", "mywindow", "location=0,menubar=0,status=0,scrollbars=0,width=100,height=100");
Format
window.open( [Url] [, Name] [, Features] [, History] )
Window features you can control
- status The status bar at the bottom of the window.
- toolbar The standard browser toolbar, with buttons such as Back and Forward.
- location The Location entry field where you enter the URL.
- menubar The menu bar of the window
- resizable Allow/Disallow the user to resize the window.
- scrollbars Enable the scrollbars if the document is bigger than the window
- height Specifies the height of the window in pixels. (example: height=’350′)
- width Specifies the width of the window in pixels.
(untested)
function openWindow(){
var browser=navigator.appName;
if (browser==”Microsoft Internet Explorer”)
{
window.opener=self;
}
window.open(‘filename.htm’,'null’,'width=900,height=750,
toolbar=no,scrollbars=no,location=no,resizable =yes’);
window.moveTo(0,0);
window.resizeTo(screen.width,screen.height-100);
self.close();
}
Got this from http://saher42.wordpress.com/2006/08/10/hiding-the-address-bar-on-pageload-using-javascript/.
Firefox 3.0 and higher have disabled setting location by default. resizable and status are also disabled by default. You can verify this by typing `about:config' in your address bar and filtering by "dom". The items of interest are:
- dom.disable_window_open_feature.location
- dom.disable_window_open_feature.resizable
- dom.disable_window_open_feature.status
You can get further information at the Mozilla Developer site. What this basically means, though, is that you won't be able to do what you want to do.
One thing you might want to do (though it won't solve your problem), is put quotes around your window feature parameters, like so:
window.open('/pageaddress.html','winname','directories=no,titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=400,height=350');
I agree we can not hide address bar in modern browsers, but we can hide the URL in address bar (e.g show URL about:blank). The following is my work around solution:
var iframe = '<html><head><style>body, html {width: 100%; height: 100%; margin: 0; padding: 0}</style></head><body><iframe src="https://www.w3schools.com" style="height:calc(100% - 4px);width:calc(100% - 4px)"></iframe></body></html>';
var win = window.open("","","width=600,height=480,toolbar=no,menubar=no,resizable=yes");
win.document.write(iframe);
A solution is to use the Web Console Menu (which is not user friendly) :
- Open the console menu with Ctrl+Shift+K
- Type in the following JavaScript line
window.open("http://google.fr", "Google", "menubar=no, location=yes")and validate withEnter
Please note that you may have to allow pop-up windows to see the new window.
Additionally, you can tune the window with options in the last argument. A list can be found there : https://developer.mozilla.org/fr/docs/Web/API/Window/open
Adding to Toine42's answer, you can create a JavaScript bookmarklet to open a popup window of the current page:
javascript:(function(){window.open(window.location.href,"Google","menubar=no,location=yes")}())
You cant hide the address bar, but you can hide the status bar and toolbar and other things. Here is a good description of the parameters to the window.open() method.
window.open("http://www.my-domain.com", "My Title","status=0,toolbar=0");
In repsonse to comment:
window.open("sample.aspx?ProdName=" + productname, "height=600,width=930,status=0,toolbar=0,menubar=0,location=0,scrollbars=1,modal=1");
You can't. Modern browsers prevent popups from concealing the domain of the page they are showing by not providing a mechanism for hiding the address bar.
I'd recommend changing the design to avoid popups (which are a horrible piece of UX).