Browsing through old posts on my personal blog, I came across an entry about using
target="_blank" in href tags in HTML to make links open in a new window when clicked.
I had convinced myself that _blank was evil and swore never again would I force the user’s browser to open a new window when clicking a link.
However, nearly 10 years later I find myself routinely following the often-used pattern of “internal site links open in same browser window, links to external URLs open in a new browser window”.
I though it a good opportunity to do some quick research into what is now considered best practice for using _blank, and was somewhat dismayed (although not altogether surprised) to discover that seemingly no progress has been made at all on this in the past 10 years!
There are still many arguments on both sides about what is appropriate and what is “right”, but no broad consensus yet.
I must admit that from a user perspective, I rarely think about the behaviour of the browser in opening links. 99% of the time if the link is something I want to visit later, I’m using the middle mouse-button to open the link in a new tab anyway. In Chrome, when I click on a link that contains a _blank target, it opens in a new tab – an identical outcome to using the middle mouse button anyway. Furthermore, the UI for Chrome makes it very easy to drag browser tabs around, docking and un-docking them from browser windows with ease – so even if I do end up with an unwanted new window, it is generally trivial to dock it back where I want it as a tab on an existing window.
Anyway, without a clear consensus on best-practice with using _blank, I guess I’ll just keep doing what I’ve been doing – using _blank for links to external sites.