Hide address bar in all browsers

I need to hide the address bar of all browsers through my JavaScript code. Can this be done?

Here is my code:

window.open("displayPdf.php?mnth="+mnth+"&year="+year+"&val="+newVal); dom.disable_window_open_feature.location dom.disable_window_open_feature.resizable dom.disable_window_open_feature.status 
+5
source share
2 answers

This is not possible in modern browsers due to security restrictions.

Official Sources:

  • Firefox

    In Firefox 3, dom.disable_window_open_feature.location is now set to true by default, making the presence of the location bar look a lot like IE7. See Error 337344 for more information.

  • Internet Explorer 7 and later

    In Internet Explorer 6, the location indicates whether to display the address bar.

    (assuming the behavior ends in IE6)

  • Chrome / Chromium

    These toolbar hiding options are ignored in Chrome. You will also notice that modern browsers tend not to hide it as protection / antiphishing measures. Also see https://bugzilla.mozilla.org/show_bug.cgi?id=337344

+17
source
 ClientScript.RegisterStartupScript(GetType(), "openwindow", "<script type=text/javascript> window.open('abc.aspx?id=" + str_id + "','null','location=no,toolbar=no,menubar=no,scrollbars=yes,resizable=yes,addressbar=0,titlebar=no,directories=no,channelmode=no,status=no'); </script>"); 
-4
source

All Articles