Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Deprecate target attribute in <a> tag

by tinita (Parson)
on Sep 16, 2005 at 18:55 UTC ( [id://492723]=note: print w/replies, xml ) Need Help??


in reply to Deprecate target attribute in <a> tag

i think it's a common practice to let all links to other sites open in new windows, and relative links staying on the same site open in the same window. maybe that could be applied here, links made of [title|id://id|...] don't have targets, links created by [http://some.other.site.example|title] get a target. (update: meant as a proposal like it could be made)
and if you want control, use <a href...
links that i'm unsure of, i always open in a new tabbed opera window, anyway.

Replies are listed 'Best First'.
Re^2: Deprecate target attribute in <a> tag (why)
by tye (Sage) on Sep 17, 2005 at 00:00 UTC

    I've seen this practice quite a bit and I get the impression that a big part of the motivation for this is a misguided "don't change the channel" idea. That is, no small number of "web designers" are somewhat reluctant to include links that go off-site because such could take "customers" away from their site (reducing the number of "impressions" that they can charge their advertisers for, for example). So having off-site links open in a new window means that the visitor is still "on your site" in the original window.

    Another motivation is preventing confusion. You want visitors to realize that they've moved to another site. Frankly, most sites are way too crowded and complicated and this often makes it difficult to notice that you've jumped to a different site. So I'm not much worried about this problem at PerlMonks (this site is simple enough that what little style we have is easy to notice and we have just one small rotation of ads and I don't see those ads on other sites).

    Then there are even more valid reasons of navigation. It often makes a lot of sense to follow a link for a different site via a new window or new tab (in part because the "Back" button can be problematic and many users are shy to use it).

    But, IMO, the real culprit here are the browsers. I'm glad to hear that some browser / plug-in developers are finally looking at the problem. It is quite unfortunate that most browsers don't offer any of the following features ("undo" is almost always better than "Are you sure?"):

    • An "alternate click" for following a target="_blank" link but staying in the same window
    • A user setting for making target="_blank" open in a new tab (or just ignore it)
    • A user setting for prompting when a target="_blank" link is clicked so you can quickly pick if you want a new window, a new tab, or just stay in the same tab

    But even more unfortunate, IMO, is that they don't let you deal with not getting what you wanted (through a mistake or just being surprised by some mis-guided "web designer"'s actions) by offering any of the following features:

    • Move (copy) this window/tab to another window/tab (IE has always let you do this, but most other browsers don't by default, it seems)
    • Drag this tab out to be a separate window
    • Drag this tab from one window to another
    • Drag this window into another window so you are left with just one window that contains all of the tabs
    • Close this just-created window/tab, moving the current page back to the original window

    So I find it misguided to be overly adverse to using something like target="_blank" only because browsers are currently quite bad at dealing with it well. It should be reasonable for a web author occasionally provide a gentle suggestion that it might be best or more convenient if this or that link left the current window intact. There are times when this is a reasonable suggestion and, IMHO, a helpful default.

    For example, if you've got a big form (like user settings) that contains one or more "help" links, it can really suck to click a "help" link only to realize that you now can't see what it is talking about so you have to click "Back" and reopen it in a new window so you can consult the two windows together... only to find that your browser has thrown away all of the changes you made to the form for some perverse reason. This really sucks when you've spent 45 minutes composing a reply...

    But that target="_blank" should just be a gentle suggestion of something helpful. Unfortunately, browsers turned it into something over which you have nearly no control and several people have become quite annoyed with the feature. Perhaps because it is a behavior that is so similar to pop-up ads (which are just evil).

    I do believe in only using target="_blank" very sparingly because of the current state of both browsers and frustrated browser users.

    But I really wish the frustrated browser users would direct this frustration at the browsers (or as motivation for writing/finding a plug-in or proxy or better browser).

    I'm not sure what "deprecating" target= means. Is this just adding a statement against its use in a few key places in the site documentation? I'd be fine with that. I can't think of any other (desirable) way of "deprecating" it without disallowing it. (I'd rather not disallow it, even though I agree that it should only be used rarely.)

    - tye        

      interesting thoughts, and i agree. most users including me work around these "bugs" of their browers (all in a different way) because they got used to it...
      only to find that your browser has thrown away all of the changes you made to the form for some perverse reason. This really sucks when you've spent 45 minutes composing a reply...
      i know what you're talking about... =)

      i still hope someday there will be a browser that

      • doesn't throw away form input, like lynx
      • but has graphics and is still fast, like opera
      • lets me edit textareas with $EDITOR, like lynx
      • is extendible and can be configured, like firefox
      to all browser developers: i would pay for such a browser =)

      For FireFox, visit: [about:config], and look for browser.link.open_newwindow.

      Set it to :
      • 1 : Open in the current window
      • 2 : Open in a new window (default)
      • 3 : Open in a new tab

      He who asks will be a fool for five minutes, but he who doesn't ask will remain a fool for life.
      Chady | http://chady.net/
      Are you a Linux user in Lebanon? join the Lebanese GNU/Linux User Group.
        Howdy!

        Thanks for pointing this out!

        yours,
        Michael
      In a sane TIMTOWTDI spirit, maybe it's time to resume your old idea :)

      Flavio
      perl -ple'$_=reverse' <<<ti.xittelop@oivalf

      Don't fool yourself.
Re^2: Deprecate target attribute in <a> tag
by herveus (Prior) on Sep 16, 2005 at 19:16 UTC
    Howdy!

    Ummm... "footnote call".

    Can you back that claim up with evidence? I'm not aware of that being a common practice, let alone a recommended practice.

    I see no evidence that square-bracket links use the target attribute at all on PM.

    yours,
    Michael
      Can you back that claim up with evidence? I'm not aware of that being a common practice, let alone a recommended practice.
      i meant in WWW in general, at least that's what i see, for example in wikis. maybe i should check...
      I see no evidence that square-bracket links use the target attribute at all on PM.
      no, that was meant as a proposal. =)
      A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://492723]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (1)
As of 2024-04-25 00:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found