Target='_blank' to show in new window, NOT new tab, possible?

Solution 1:

You cannot control this - it's entirely at the discretion of the user-agent; which is the point, after all. All you can specify is that the page be opened in a different viewpane context, and it's up to the user to decide how they want your window to take up their screen space/taskbar list/Alt-Tab shortcuts etc.

In fact I'd go even further and say that if at all possible you should avoid opening up a new tab/window at all. I know that I get a little annoyed when websites do this, and it feels a bit clunky and 1990s what with all the Ajax and floating divs and magic we have nowadays.

Solution 2:

This is working fine

window.open(yoururl, "Popup", "location,status,scrollbars,resizable,width=800, height=800");

For all parameters see window.open

Edited Date:- 12th Aug, 2021 If you does not want to use JavaScript Function, then You can write Inline Script for Open Page in New Windows, & it is support all the modern browsers

<a href="https://stackoverflow.com/" onclick="window.open('https://stackoverflow.com/', 'newwindow', 'width=400, height=250'); return false;">with href</a>


<a href="#" onclick="window.open('https://stackoverflow.com/', 'newwindow', 'width=400, height=250'); return false;">without href</a>

You can see Live Working example on this jsfiddle.net link

Solution 3:

<a href="javascript:window.open('http://example.com/popup.html','blank')">Contact</a>

Solution 4:

I believe this is a browser-only setting that cannot be set from HTML or Javascript.