target="_blank" Is Holding Your Users Hostage

posted Wednesday, June 20th 2012 at 3:07 PM by

The target='_blank' attribute is holding up your users. You're going to need a good hostage negotiator. Included here are tips for Firefox and Chrome users so you can disable this annoying behavior, but first lets start with a little background and rational behind that target attribute.

Saying that links are 'pretty easy to use' would be an understatement. The default behavior is that they open in the current tab when clicked on. If the user wants to open a link in a new tab, all they need to do is center-click or right-click and select 'Open Link in New Tab.' The problem comes in with the abuse of the target='_blank' HTML attribute. Web developers have been using this for years in a futile attempt to keep users held hostage at a particular website. I hear it all the time, 'We want to keep the user on the page!' The trouble is the user doesn't want to stay on the page, that's why they're clicking the link.

The hostage negotiator says 'Don't force new tabs on the user!'

  1. It's unexpected behavior, and that is frustrating for users. The default action for a link is to open in the same window, and that's what the user expects.
  2. It isn't what the user wanted. If the user wanted a new tab, they would have opened the link in a new tab on their own. Either by center-clicking on the link or right-clicking and selecting 'Open Link in New Tab.'
  3. It eliminates the back button and history. If the idea is to the keep the user on the page, you've actually made it more difficult for them because the browsers back button no longer works. They can't easily get back to the page you're trying to keep them on.

What can you do to prevent it

First, if you're a web developer stop using the target attribute for links!


There's good news for the rest of us, too. You can change the settings in Firefox and Chrome so that links will always open in the current tab (unless decided otherwise by clicking 'Open Link in New Tab.') Unfortunately for IE users, there isn't an add-on or a setting that can be changed. Just one more reason to upgrade from IE to a modern, stardards-compliant browser.

Instructions for Firefox

  1. Access Firefox's settings by typing 'about:config' in the address bar.
  2. In the Search bar at the top, type 'browser.link' to bring up a couple different link settings.
  3. The setting we want to modify is 'browser.link.open_newwindow'. The default value is 3, which lets the HTML target attribute determine where new links are opened. Double click on it to change the value to 1, which will always open links in the current tab. If you're curious, changing it to 2 will always open links in a new tab. (I trust you will use this information for good, and not for any April Fools 'new tab virus' pranks.)

Instructions in Chrome

I wasn't able to find any way to disable the default behavior for links in Chome, but there are two handy extensions that will accomplish the same task. The first, and my favorite, is 'No Tabs' which will force everything to open in the current tab. The second extension I recommend is 'Open in This Tab' which gives you a context-menu (right-clicking) option to open a link in the current tab.

That's It!

Now you can fight back against the annoying links that are unexpectedly opening in new tabs and reclaim your browser!

Share This:



View (0) Comments Post a Comment
  • Replying to Adam Konieska on target="_blank" Is Holding Your Users Hostage