News for hackers. Stuff that matters.

Ask HN: target="_blank" thoughts?

I'm marking up a page right now, have a list of Twitter users to link to and am debating the use of target="_blank" without an explicit "new tab/window" icon.

I personally have no use for this anymore. If I am browsing a webpage and I want the link to open in a new tab I will do it myself, otherwise I expect it to open in the same tab.

How do others feel about this?

( 20 comments | 10 points | on HN )
Re:Ask HN: target="_blank" thoughts? by nostrademons on Sunday May 22, 2011 @09:22PM (#2574726)
I hate it when websites do this, because it overrides the expected behavior of the browser with the author's desires. People who want each link to open in a new tab/window know about Ctrl-Click or Right-Click+Open-in-new-window. They can do it themselves if they desire. For everyone else, this is rude, annoying, and breaks the back button.
Re:Ask HN: target="_blank" thoughts? by staunch on Sunday May 22, 2011 @11:18PM (#2574874)
Has Google ever done a study to see how many people know about opening a link in a new window/tab?

They must have, right?

Based on my experience it's very much less than half of normal people know how to do this.

Re:Ask HN: target="_blank" thoughts? by flowersmoker on Monday May 23, 2011 @01:08AM (#2575032)
I googled this for a bit, and while Google did not do a study on opening links in new tabs/windows, it seems like the University of Washington and Microsoft did: http://jeffhuang.com/Final_ParallelBrowsing_HT10.pdf

Just skimmed the abstract, which says "We find that users switch tabs at least 57.4% of the time." but looking at Table 1, it seems like 64% of people do not open search results in new tabs/windows at all, so your initial guess is about correct.

Re:Ask HN: target="_blank" thoughts? by lacker on Monday May 23, 2011 @10:16PM (#2578403)
Yes. The vast majority of people do not know how to open a link in different ways. They just click the link. Unless you are making something very techy like github, design for the user that simply clicks on links. Of course, most users expect normal links to open in the current page, so don't just throw target=_blank everywhere.
Re:Ask HN: target="_blank" thoughts? by devicenull on Monday May 23, 2011 @08:46PM (#2578217)
I'm not so sure they have. Their 'Block all results from domain' feature doesn't register middle clicks. I'd imagine if they had been recording when people open new tabs, they also would show the Block all results link when you middle click.

It's actually quite annoying that middle click doesn't bring up the link.

Re:Ask HN: target="_blank" thoughts? by holdupadam on Sunday May 22, 2011 @09:24PM (#2574729)
Totally agree.

It seems like a convention that exists for sites that want to force the user into their content even when they want to leave. Unless it is a file download link - I find it incredibly rude.

Re:Ask HN: target="_blank" thoughts? by EECS on Sunday May 22, 2011 @09:28PM (#2574733)
You forgot the famous third-click. Ctrl or cmd click or right click seems... too much work lol
Re:Ask HN: target="_blank" thoughts? by emitstop on Sunday May 22, 2011 @09:43PM (#2574759)
Ever since I found out about the amazing middle click function, I manage to stack up probably 50-60 tabs by the end of everyday. It's hard to imagine how we managed back when there were no tabs on browsers.
Re:Ask HN: target="_blank" thoughts? by schraeds on Sunday May 22, 2011 @11:19PM (#2574875)
same boat here. i gotta groom tabs a few times a day, save sessions, save a bazillion bookmarks and my browsers still chow down memory!
Re:Ask HN: target="_blank" thoughts? by getonit on Monday May 23, 2011 @07:36AM (#2575622)
> People who want each link to open in a new tab/window know about Ctrl-Click or Right-Click+Open-in-new-window.

Source? That's almost entirely untrue in my own experience (my audiences are quite large, quite varied, and not particularly ludite).

Re:Ask HN: target="_blank" thoughts? by plasma on Sunday May 22, 2011 @10:28PM (#2574810)
I think using it is still appropriate when you know the user isn't intending to really leave the page they're on.

For example, clicking on a help link (while filling out a screen) or anything else that would disrupt what the user's doing unintentionally.

Re:Ask HN: target="_blank" thoughts? by jenniart on Sunday May 22, 2011 @11:03PM (#2574853)
I agree. I think sometimes it's okay when you're sure that the user wouldn't want to browse away from the page they are on... such as when filling out a form or maybe even watching a tutorial video. Otherwise, I think it should be left up to the user.

Personally I tend to use it for links like "follow us on twitter" because I'm hoping that they will keep both tabs open. However the comments here are making me wonder if that's too forceful.

Re:Ask HN: target="_blank" thoughts? by mooism2 on Monday May 23, 2011 @05:32AM (#2575427)
My expectation when browsing the web is that web apps open external links in new tabs, while mere web pages open links in the same tab. Unhelpfully, the line between "app" and "page" is fuzzy.
Re:Ask HN: target="_blank" thoughts? by squidsoup on Monday May 23, 2011 @01:04AM (#2575028)
Agreed - fine for contextual information, help, glossaries, but not to be used indiscriminately.
Re:Ask HN: target="_blank" thoughts? by JohanE on Monday May 23, 2011 @01:25AM (#2575055)
If you're using target="_blank", you should let the user know that a new tab/window will open. Probably use a symbol like this: http://code.google.com/apis/checkout/developer/files/OpenInN...
Re:Ask HN: target="_blank" thoughts? by proexploit on Monday May 23, 2011 @11:52AM (#2576335)
Use it only when you need a new tab/window to open and nowhere else. You don't want to try and make a user's life easier by guessing if they'd open a new tab, because some won't want to.

The only place I've used it in months is on Facebook iFrame applications where otherwise avoiding it would cause a larger page to load in a smaller area and get cut off.

As another poster mentioned, it would be good to mark as opening in a new window with an icon or text. When it's a small bit of information (like a couple paragraphs of help text), I always appreciate a modal window or tooltip first.

Re:Ask HN: target="_blank" thoughts? by Omni5cience on Sunday May 29, 2011 @05:48PM (#2597697)
"The only place I've used it in months is on Facebook iFrame applications where otherwise avoiding it would cause a larger page to load in a smaller area and get cut off."

Which would be the "target" attribute's intended purpose, frames that is.

Re:Ask HN: target="_blank" thoughts? by pkamb on Tuesday May 24, 2011 @02:25PM (#2580951)
There's a long-standing Chrome bug where middle-clicking target="NAMED" links opens them in a new tab in the foreground, not the background as is expected. So annoying.

http://code.google.com/p/chromium/issues/detail?id=62319

Re:Ask HN: target="_blank" thoughts? by rocktronica on Monday May 23, 2011 @12:04AM (#2574936)
I understand the sentiment and don't use it on personal sites. For apps, though, I don't quite have the confidence that my users will know to open external links in new tabs.
Re:Ask HN: target="_blank" thoughts? by cstrouse on Monday May 23, 2011 @03:58PM (#2577338)
It's fine I guess for external links but it really bugs me when people use it for links to other pages on their own site.