Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re^2: Deprecate target attribute in <a> tag (why)by tye (Sage) |
on Sep 17, 2005 at 00:00 UTC ( [id://492788]=note: print w/replies, xml ) | Need Help?? |
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?"):
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:
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
In Section
Perl Monks Discussion
|
|