You Choose the Target!

Share/Bookmark Print This Post

target logo on TV Ok, I’m going to try to keep this short and sweet. But first, let me tell you why.

I believe I have a problem, perhaps genetic, that does not allow me to make sentences shorter than originally written or determine when an article has gone on for too long, resulting in things like paragraph-long sentences, long meandering digressions, people having to take a bathroom break before finishing one of my articles, and browsers crashing as they run out of memory.

That said, now I have even less space to write this article. Ok, let’s get to it.

You probably know what an anchor tag is. If you don’t, you may still be using AOL as your internets provider. An anchor tag usually the first or second HTML tag that you learn in how-to-build-a-web-page-1.0-school. It’s so ubiquitous, in fact, that I won’t even show you an example here.

So, one of the attributes you can give the anchor tag is called target. This allows you to define where the link in the anchor tag goes. This was super-awesome in 1996 when you had a two-frame web page and you wanted links in one frame to go to pages in the other frame.

Things change. Having frames in your web pages now means instant ridicule and ostracization from polite society.

So the target attribute died too, right? Not even close. Now, if you give your anchor tag a target, and the web browser can’t find a window with the target name, it just creates a new browser window with that target. Some browsers can be configured to open a new tab, instead.

Over time, then, this minor attribute that had a valid use before modern CSS methodology, has now been co-opted into quite a different use than originally intended.

“Great!” You might think. “I like having my links open in a new tab anyway.” (I know I did, for a long time.)

The only problem is, there has always been a way to force a link to open in a new window or tab, and the opposite is not true. For example, if you hold shift or alt when clicking on a link, it will open in a new tab or window. However, what do you click to force a link to open in the same window? There is no key. It can’t be done. Your choice is gone.

That is the crux of the problem. Not everyone wants the choice taken away from them.

I decided a few weeks ago to start removing all the targets from the anchor tags on my site. Steven Hodson, author of WinExtra (and now of Mashable fame), has as well. I’ll be investigating ways of perhaps having a small icon next to links to indicate that it opens in a new window, but for now, it is in your hands.

PS – Does anyone have any tips for a WordPress plugin or other utility for making a quick little “open link in new window” icon automatically in posts?

  • I for one am thrilled that you're taking away the target="_blank"

    BTW, if you're using PC and have a mouse with a clickable wheel, you can use the wheel click to open in a new tab / window.
  • Matt Shaulis
    i know I'm not alone as somebody who is not a fan of links opening in new windows "for me", i am fully capable of opening something in a new tab if i so desire. ... if it's an application like web mail or something, sure... i can see the new window being a feature... but blog to blog there is (should be) so much linking around that a traffic nabbing target="_blank" really is an interruption to an afternoon stroll through the web. I use a simple bookmarklet to change all links to open on the current page, and i use it on sites that i *know* open new windows (like digg and certain blogs) ... but it's bothersome all the same. kudos for the choice to get rid of them.

    P.S. Awful browser, IE has [or at least used to have] an option in the context menu, "Open in this window" in addition the "...new window" option.
  • Thanks, Matt. That sounds like a useful little bookmarklet to have. Got a link to it?
  • Matt Shaulis
    i don't have a link to the one i've got per se (I wonder if i could just paste the js...) , but a quick Live search turned up this link: https://www.squarefree.com/bookmarklets/pagelinks.html which has what amounts to the same bookmarklet, as well as the reverse, turning all links into new window links... (and actually a couple other neat things).
  • Ahh yes, the master page for useful bookmarklets.. I linked to this site in a previous article called "my bookmarklets, let me show you them!" Obviously, I didn't do enough exploring of the site back then.
  • As a Firefox advocate I solved the problem by installing Cool Iris "Previews" which permits browser in browser viewing. When I hover the link a small blue icon appears and if I hover the icon a new and smaller window opens. As soon as you hover away from the new window you're left where you started. It's made browsing so much more efficient. There are features like being able to stack the previews, which minimizes the screen and anchors it to the right side of the browser. You can actually pop out of a preview into a full fledged window. Highly recommended.
  • I will have to check this out! Is the plugin FF3 compatible yet?
  • Yup, I'm using Cool Iris with FF3, it's pretty interesting, but can get annoying at times (like hovering over small linked icons). Overall though, I like it
  • Hm, I always opted for anchors opening in a new window, but, there, you did it, I might change my mind!
    It was the choice argument that mattered.
  • Are you speaking about your own blog, Nikos, or in your browser?
  • My blog
  • Links opening in a new window or tabs are the standards these days (almost). I would prefer it did it automagically instead of me having to go through keyboard shortcuts. Plus, I think a lot of people use it to keep users on their site while exploring another site's content, which has its benefits. This is what I prefer rather than the link opening on the same page.
  • At least for FireFox, Tab Mix Plus has an option to force all clicked links to open in a new tab. Here's a version that works with firefox 3:

    http://tmp.garyr.net/forum/viewtopic.php?t=7031
  • AWESOME!!! I was really missing this in FF3...clicking those tinyurls from twhirl kept stomping on whatever page I had open (on Windows) and in FF2 the only way to stop it from doing that was this plugin. I wasn't aware they had it working with FF3. FWIW, on my Mac, regardless of the browser if I click on a link from anything other than the browser it forces it into a new browser window...much more natural for me.
  • This is a compelling argument, Corvida. But there has to be a plugin that forces all links to open in a new window or tab, and the same can't be said for the reverse. If I find one, I'll link it up here.
  • I am tab junky as well. I love Tab Mix Plus and force everything to a new tab. The open in a new window does not bother me in the least. I also use Colorful Tabs addon to help distinguish one tab from the next.

    BTW I also middle click all links which goes to a new tab.
blog comments powered by Disqus