window.open() not working properly in Firefox and Chrome

Asked

Viewed 438 times

4

I am using the following Javascript to hide the address bar in popup:

oncomplete="window.open('lista_persist.xhtml', 'newwindow', 'directories=0,titlebar=0,toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1, width=800, height=600');"

However the address bar is only hidden in IE, I tried that way too:

oncomplete="window.open('lista_persist.xhtml', 'newwindow', 'directories=no,titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes, width=800, height=600');"

If anyone can help me, I’d appreciate it !

  • 2

    This is no longer possible in modern browsers due to security restrictions, as pointed out by this other answer: http://stackoverflow.com/questions/16603308/hiding-address-bar-in-all-browsers but if you want to hide the navigation bar on android, you can do this: http://stackoverflow.com/questions/4068559/removing-address-bar-from-browser-to-view-on-android

  • Thank you very much !

  • 1

    @Andersonmadeira create an answer about this.

1 answer

6


Security and anti-phishing measures have forced modern browsers to no longer allow the address bar to be hidden. It is worth remembering that information from SSL certificates, which play a crucial role in the security of a website, appear in the address bar, so it is necessary to have it there, as an anti phishing measure and to verify the authenticity of the site.

Official browser docs make this clearer:

In the firefox doc, it says that the presence of the address bar is forced:

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.

Regarding Internet Explorer, doc says that this ended with version 6:

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

And the most emphatic, says that these parameters are ignored:

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

  • Thank you very much !

Browser other questions tagged

You are not signed in. Login or sign up in order to post.