Don’t use target=_blank

Written May 26, 2009. 23 comments.

Despite what you may have heard from your boss who doubles as a ‘usability expert’, people actually like to have control over their browser. One of the most infuriating ways to annoy web surfers (me included) is to make decisions for us, and if you’re forcing external links into new windows or tabs then you’re doing exactly that.

The thing is, I know how to use my browser, and so do others. If I want to open a link into a new tab, I’ll hold CTRL while I click. Or if I’ve got a mug of Milo in one hand I will select ‘open in new tab’ from the context menu.

But even if you have the evidence to suggest the opposite, you have no reason to believe they would prefer you force links to open in new windows for them anyway. So why do it?

For the benefit of the noobs who have been following this blog, opening a link in new window is accomplished by:

<a href="http://www.w3c.org" target="_blank">I don't care about usability</a>

If you’re using XHTML strict then you’re probably already aware that target=”_blank” has been deprecated so you shouldn’t be using it unless you want to invalidate the document anyway. But if you’re one of those developers who uses JavaScript to force links into a new window just so you’re document can still validate (because you didn’t have to use target=”_blank”), then you’re more evil because you’ve actually gone to the extra effort to annoy the user.

For the record there is no actual usability standard that I’m aware of that forbids forcing links into a new window, only the W3C standard. But it’s a well known usability notion that opening links into new windows is pointless and annoying.

Why do they do it?

A lot of web developers force new windows under the misguided theory that the user will stay on their web site.

Here’s the thing. If someone wants to leave your web site, they will leave your site. That’s their choice, not yours. If you force all your external links into a new tab or window, they are still going to leave your web site if they’ve made the choice to do so. Your site still being in plain view isn’t going to change that fact. I’m sorry, but it isn’t.

Need more convincing? A quick Google search led to me to “The top 10 web design mistakes of 1999“, where number 2 lists “Opening new browser windows”.

Now before you cry “But that was 1999!” consider this: Even back then, during a time when designers still used tables and 1 pixel spacer gifs for layout and the Flash intro epidemic was rampant, some common sense prevailed to know that forcing new windows was just plain wrong.

Take control

I all fairness, some developers force new windows because their boss wanted it that way or because the marketing guy (who still keeps a first edition copy of ‘marketing in the 90′s’ behind his desk) says it would improve sales. If you fall into this category, I feel your pain.

If nothing else remember this: you’re the one they pay to “know about all that web stuff”, so if it’s against your better judgement, make it a point to explain error of their way.

Who is That Web Guy?

Michael is a veteran web designer / developer / usability evangelist, practitioner of W3C guidelines, and currently head of the web dev unit at Stormbox, a branding and creative communications agency located in Perth, Western Australia.

23 Responses to Don’t use target=_blank

  1. CSS Babe says:
    Guilty as charged but I promise to change! Honestly I never thought it was a big deal.
  2. Carerra Davis says:
    Woah there – tell us how you really feel :-)
  3. Harun Smrkovic says:
    I don’t really get this. I don’t find annoying when browsing the web that the page opens in new window …
    But everyone know his best ;)
  4. Marty says:
    Are you happy with designers making decisions for you? If so where do you draw the line? The user should control the experience not the designer.

    Good topic web guy.
  5. Harun Smrkovic says:
    Well, I am the designer :)
    And now you all got me thinking.. To _blank or not to _blank :)

    You see, my point is, no matter do you want to have your visitor stay on your site, visitors can find annoying fact that their current page is being interrupted.
    BTW, about 95% of Internet users in Bosnia, Croatia, Serbia and similar, my targeted area (I live in BiH, so…), don’t even know about those functions (CTRL + Click, middle click etc.)..

    p.s.
    Web guy, I don’t see practical use of the ‘captcha’ below. It’s REALLY EASY to make computer see what’s on the picture (well, not really what’s on it, but by looking into HTML), and write in comment.

    Good luck!
    Love your blog!
  6. Kim OJ says:
    Unfortunately my job forces me to regularly visit sites that open links in new windows, not even just a new tab, but a new window, it’s very annoying, and I always end up copying the url and pasting it back into my original window.
  7. That Web Guy says:
    Thanks for the compliment Harun. It’s encouraging.

    Regarding the CAPTCHA, the HTML doesn’t give away the answer (the name of the character) – it’s only a number each time – like 5.jpg for example – which will fail if you enter just a number anyway. The only way I see it can be beaten is with facial recognition software, or by manual spammers who look for every one of the characters that appear and then use all those names in an automated script.

    Unless you’ve somehow gained access to my PHP script that contains all the answers :-)

    I’ve used this system on my other blog without a single spam hit for over a year now.
  8. Marty says:
    Careful there my friend. I’ve heard many designers quote statistics based on no actual foundation. Even if it was really 95% that doesn’t make it right to force control of their experience.

    Web guy: I can think of one time when it’s probably ok to open a new window and that’s if the link advises them first something like…

    “Click here to visit Digg (opens in a new window)”

    What do you think?
  9. Sarah says:
    You’re preaching to the choir here. Here’s one I have bookmarked on the same subject http://www.smackthemouse.com/20030831

    I love what I see here Web guy! Is this your own design?
  10. Harun Smrkovic says:
    Web Guy,

    Probably no one wanted to spam you. If you understand what I’m saying, someone could make a script that binds characters to their numbers, like an array $spam = array(1.jpg =>’superman’, 2.jpg =>’spiderman’); and so on.. if you know what I mean..
    Well, probably you’ll never need some higher security because why would anyone want to spam a nice web guy :) , but I am just saying it’s possible :)

    Keep up the good work ;)
  11. That Web Guy says:
    Yes that’s possible, but it goes against general spammer ethos – getting manually involved to begin with. I think the solution then would be to make a random alpha-numeric combo agsinst the images so they’re different every time.

    In any event I loathe CAPTCHA from a usability perspective so I’ve tried to make it as easy as possible. If I get some spare time I will see if I can implement the change – or if I start to get spammed – which ever comes first ;-)
  12. Anderson says:
    It’s such an obvious thing I’m surprised so many people just don’t get it. Why force an action on the user? Give them the choice – it makes more sense.

    Thanks web guy – you are the man!
  13. kHa says:
    well this is become off-topic but i guess this picture confirmation thing is very cool and have special meanings. i mean your are not human if you don’t know who mr. spock is? right :D
  14. new says:
    hi,
    in my opinion it is some times very comfortable to open a new tab with target_blank, cause if i click on a link to a new website and the new site opens in the same tab then i must return with the browsers back button and go to the same link and click on it with right mouse button and choose load in new tab…. this is wasting time… click on a link, open new tab and all is fine, cause a i have the old site and the new site open.
  15. owen says:
    Well we have different opinions on this one.. but opening in a new window or tab is a great thing for me.

    And this Are you human verification is becoming a challenge.. I thought it was Anakin and then this frog appears whoah.. U Should put anime too if that’s the case.
  16. Jon N says:
    Bravo and amen to that.
  17. Stefan van Zanden says:
    Nice article, I banned the use of _blank for quite some time on my and customer pages,
    altough it is sometimes hard to confince some customers / webdesigners to not use it :-(.

    I find it usefull to also provide the external links with an image allowing the user to easily spot that it is actually an external link.
    I use the image which is also used on the wikipedia and quit some other websites:
    http://en.wikipedia.org/wiki/Wikipedia:Manual_of_Style#External_links
  18. That Web Guy says:
    That’s reasonably acceptable because the user is at least informed. But it means you can’t use the strict doc type because target=”_blank” is deprecated. If you’re not using xhtml strict though then it’s cool in the gang.
  19. Stefan van Zanden says:
    I mean that I am not using it at all anymore,
    “_blank” is dead to me and I never want it back on my websites or on the websites I create for customers :-)

    STRICT + valid is the way I role, I just have to be stubern / poot my foot down and explain it well to why I am disallowing them (my customers) to use that option, even if it will cost me an also stubern / “thinks who know it all” customer and that is sometimes hard :-)

    The image I provide is just an extra way of informing the visitors that they are gonna open an external page so they can do with it whatever they want and so they won’t get “surprised” by a all new page on visiting :-).
  20. That Web Guy says:
    Gotcha.
  21. Mike says:
    I recently got in a discussion online with another web user and he cited your article. My issue with this is that both of you are citing a ten year old document that does not relate to tabbed-browser user experiences. While I am inclined to agree with your point I think it would be relevant to point out that ten+ years ago it was considered more of a hi-jacking to open a new window but with tabs it’s less volatile. Thanks for taking the time to write your thoughts though!
  22. That Web Guy says:
    Thanks Mike,

    I believe this goes to the issue of usability. While most people have a tabbed browser now, don’t assume that they:

    1) like using tabs
    2) know how to use tabs
    3) want to use tabs
    4) have a tab capable browser

    Given that users are still able to get around your site just fine without opening stuff in new tabs, there’s really no justifiable reason for designers to be forcing them, other than to match their own personal ‘tab politics’.

    Me personally, I let the user decide what they want to do with links on my site. I have no business dictating to them how to get around the interwebs :-)
  23. _mark says:
    its useful and necessary in some instances. especiallywhen naving away destroys a session (as in data loaded in an infinite scrolling scenario)

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

4 − = one