Don't use target=_blank

Written by That Web Guy on 26th May 2009. 20 comments

Don't use target=_blank
  • Avant Innovations
  • Advertise Here

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.

Is this worth sharing?

That Web Guy

About That Web Guy

That Web Guy (Mikey to his friends) is a veteran web designer based in Perth, Western Australia, and currently Design Director at Perth Web Design. When he's not XHTML'ing or messing around in Photoshop, Mikey can usually be found preaching web standards evangelism onto unsuspecting victims.

Feel free to send That Web Guy a message some time, follow him on Twitter, or make a donation.

Comments

CSS Babe

CSS Babe

Guilty as charged but I promise to change! Honestly I never thought it was a big deal.

Tuesday 26th May 2009 | 07:16 PM Reply Comment URL Profile Back to top

Not a Member

Carerra Davis

Woah there - tell us how you really feel :-)

Tuesday 26th May 2009 | 07:24 PM Reply Comment URL Back to top

Harun Smrkovic

Harun Smrkovic

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 ;)

Tuesday 26th May 2009 | 08:09 PM Reply Comment URL Profile Back to top

Not a Member

Marty

Responding to this comment by Harun Smrkovic

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.

Tuesday 26th May 2009 | 08:15 PM Reply Comment URL Back to top

Harun Smrkovic

Harun Smrkovic

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!

Wednesday 27th May 2009 | 01:53 AM Reply Comment URL Profile Back to top

Kim OJ

Kim OJ

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.

Wednesday 27th May 2009 | 05:59 AM Reply Comment URL Profile Back to top

That Web Guy

That Web Guy

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.

Wednesday 27th May 2009 | 06:11 AM Reply Comment URL Profile Back to top

Not a Member

Marty

Responding to this comment by Harun Smrkovic

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?

Wednesday 27th May 2009 | 06:21 AM Reply Comment URL Back to top

Not a Member

Sarah

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?

Wednesday 27th May 2009 | 07:44 AM Reply Comment URL Back to top

Harun Smrkovic

Harun Smrkovic

Responding to this comment by That Web Guy

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 ;)

Wednesday 27th May 2009 | 07:50 AM Reply Comment URL Profile Back to top

That Web Guy

That Web Guy

Responding to this comment by Harun Smrkovic

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 ;-)

Wednesday 27th May 2009 | 08:00 AM Reply Comment URL Profile Back to top

kHa

kHa

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

Saturday 6th June 2009 | 11:34 AM Reply Comment URL Profile Back to top

Not a Member

new

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.

Sunday 7th June 2009 | 06:40 PM Reply Comment URL Back to top

owen

owen

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.

Saturday 13th June 2009 | 12:14 AM Reply Comment URL Profile Back to top

Not a Member

Anderson

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!

Monday 1st June 2009 | 12:14 AM Reply Comment URL Back to top

Not a Member

Jon N

Bravo and amen to that.

Wednesday 1st July 2009 | 12:00 AM Reply Comment URL Back to top

Not a Member

Stefan van Zanden

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

Friday 31st July 2009 | 06:38 PM Reply Comment URL Back to top

That Web Guy

That Web Guy

Responding to this comment by Stefan van Zanden

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.

Friday 31st July 2009 | 07:22 PM Reply Comment URL Profile Back to top

Stefan van Zanden

Stefan van Zanden

Responding to this comment by That Web Guy

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 :-).

Friday 31st July 2009 | 08:36 PM Reply Comment URL Profile Back to top

That Web Guy

That Web Guy

Responding to this comment by Stefan van Zanden

Gotcha.

Saturday 1st August 2009 | 06:19 AM Reply Comment URL Profile Back to top

FYI: You are currently not logged in. It's cool though - you can still comment. But only members get a profile page, access to the download section and they can pimp their own web sites. Feel free to register or Login now!

Your name:

Your comments:

Note: HTML tags are automatically stripped from comments.

Are you human?
Turing

Sorry, I have to ask. So what sort of animal is this? (Hint: you don't have to be perfectly specific)

Back to top

Login to That Web Guy Blog

Login

Not registered? | Forgot your Password? Cancel Login