I have a very good reason to use target="_blank" on links on my website (please don't tell me about standards). What happens when you click the link on a mobile device? I don't have a phone to test it.
target="_blank" is a special keyword that will open links in a new tab every time. target="blank" will open the first-clicked link in a new tab, but any future links that share target="blank" will open in that same newly-opened tab.
It just opens in the same browser window on these problematic devices (works fine on mine). I have confirmed that either way (target="_blank" or JS) does work on other multiple devices, including my Android phone.
A target attribute with the value of “_blank” opens the linked document in a new window or tab. A target attribute with the value of “_self” opens the linked document in the same frame as it was clicked (this is the default and usually does not need to be specified).
There's A Security Reason For Not Using _Blank Google's Web. dev page on the risks of using the _blank link attribute is summarized as such: “The other page may run on the same process as your page. If the other page is running a lot of JavaScript, your page's performance may suffer.
On the iPhone, it will force Safari to open the link in a new tab.
On iOS4 devices, it opens in a new "page" within safari and the new page takes focus. Haven't upgraded to ios5 yet, but I imagine it's the same but with tabs. I don't know about other platforms, sorry
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With