Can't hide status bar when doing windows.open

2019-02-28 04:21发布

问题:

Why status bar is still shown when I'm using window.open("test.html", "a", "status=no"). This doesn't work on IE8 only and only if site is not in trusted zone. In this case status bar appears no matter what I do.

回答1:

It's an IE8 Security feature.

By default, non-trusted sites can't hide window elements (status bar, address bar) when opening new windows.

The idea is to prevent a malicious site from masquerading as a trusted site and hiding the address and status bars so you can't tell the real URL of the page.

Users do have the option of disabling this feature though.



回答2:

Newer browsers don't allow the hiding of the status bar for security reasons. Browsers show the target of a link there in order to avoid things like

<a href="http://some.evil.phishing.site">http://your.bank</a>