compile-fan
compile-fan

Reputation: 17635

What's the magic of those links that will open a new browser like in firefox?

<a ... target="_blank">...</a>

This kind of link only opens a new tab,but some websites will open a new browser instance,what's the trick?

Upvotes: 6

Views: 146

Answers (2)

Amr Elgarhy
Amr Elgarhy

Reputation: 69022

If both links are the same in all these websites, so there is a javascript window.open get called in the links which open new browser.

It is based on the browser settings, that why I said that if all links looks the same and some act different than other so there is some javascript work.

By the way,

If you set the target attribute to "_blank", the link will open in a new browser window or a new tab.

Based on the browser settings

Upvotes: 0

ngen
ngen

Reputation: 8966

In Firefox, opening a link in a new tab or window is controlled by the browser's setting. There are ways to manipulate it such as:

window.open("", "test", "height=300,width=300,modal=yes,alwaysRaised=yes")

Upvotes: 2

Related Questions