To _blank or not to _blank

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.

One thing I do find annoying are sites which use JavaScript to open a new window without all the extra baggage such as tabs, menu bars and such. In particular, since I use 1Password for managing my (literally) thousands of random passwords that have been generated for the various sites and online services I use, I want to be able to quickly access the extension icons next to the address bar in Chrome to locate and enter the password for the site I am visiting. If the site has launched their application in a window that doesn’t have these items, I can’t access the 1Password icon easily.¬†We do have the option to right-mouse-click on the top window header in Chrome to select the “show as tab” option, which does expose the 1Password icon, but it is an extra step I’d rather not have to take. Banks are particularly annoying like this – with several internet banking sites I use opening their login pages in browser windows that don’t show all the menus.

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.

Tags: ;

  • Share it!

Leave a Reply

Your email address will not be published. Required fields are marked *