Skip to content Skip to sidebar Skip to footer

Hide Addressbar

how to hide address bar from popup window opened with window.open?

Solution 1:

On modern browsers this cannot be done, it poses a security risk.

for example:

In Internet Explorer 7 and later, you cannot remove the address bar in Internet Zone windows, for security (anti-spoofing) reasons. As described in the MSDN article above, in IE7 and later, location=no simply hides the back/forward/stop navigation buttons, and makes the address bar read-only.

Source: http://msdn.microsoft.com/en-us/library/ms536651%28VS.85%29.aspx

Solution 2:

You can use the location option to toggle the address bar on/off in most browsers:

window.open('popup.html', 'popup', 'location=no');

If you are aiming for a "visually light weight window" you might also want to disable other visual elements such as toolbar, menubar, scrollbars, status:

window.open('popup.html', 'popup',
    'location=no,toolbar=no,menubar=no,scrollbars=no,status=no');

Browsers may or may not choose to follow these directives. See the comprehensive documentation of the window.open() function in Mozilla Developer Center for more options and information about support in various browsers.

Solution 3:

There are many properties associated with window.open() method Check this is useful

Post a Comment for "Hide Addressbar"