Target="_blank" not working

Let’s remind ourselves of the reason for _target=_blank.

The hypothesis is that a “low-skill” user will not be able to easily find his way back to a site having left it. This is pretty reasonable - there won’t be any navigation, Back button may get him back, but could take a long time, and many “low-skill” users have no idea about history ( and it can be difficult to find a site in history if browsing a large number of sites in a day). Providing two links is ok, but liable to confuse.

A Firefox user will very likely be aware of how to open a link in a new frame, so he doesn’t need target=_blank. Incidentally, he can use Control to open a target=_blank link in a frame instead of a window.

I’m sure in the long term target=_blank will fade away, but not for at least a few years, in my estimation.

What does annoy me is sites where you try to use right-click / open in new window, and it doesn’t work.

I appreciate the logic. I don’t agree with it, but I do recognise it.

Imho, you’re making the mistake of talking in absolutes when there are no absolutes with this issue.
We do not know the exact extent of the next user’s knowledge, so surely the only useful thing to do would be to present the choice.
It’s by far the best way to cover as many bases as possible.

By ‘forcing’ new windows on less-savvy users you are choosing their preference, even though they may actually prefer a single window or may even have been attempting to leave the site altogether.
It is neither safe nor reasonable to assume anything about their skill or intentions.

The user knows better than the author how much they themselves understand about web navigation, so attempting to consider this issue according only to a narrow set of stereotypes is, imho, missing the point altogether.

Choice is usually the best option as it is the only one that seems to account for the one fact in this issue - we don’t know enough about the next visitor through our doors to be sure that the options we force upon them will be right ones for them.

:wink:

> we don’t know enough about the next visitor through our doors to be sure that the options we force upon them will be right ones for them

I’m not claiming that target=_blank is anything like perfect, just that in most cases (inexperienced users) it’s still probably the best choice for most situations, and likely to remain so for a while. Sure, I cannot prove this, it’s just a judgement.

While providing a choice is theoretically attractive, I think the confusion and distraction is likely to outweight any advantage in most cases. This would not apply for pages which are expected to be visited many times, where the user can learn the interface. It might well be appropriate where external links are the main object of a site ( directories, search engines, web rings, that sort of thing ). In these cases though, it’s normal not to offer a new window in any case, AFAIK.

I’m quite willing to be proved wrong, but I’m not convinced so far.

I honestly don’t think it’s possible to be much clearer or much less confusing than I’ve been in my own site.
It makes the situation pretty clear and the option to change a pretty straight-forward affair.

Conversely, I actually think that forcing new windows on potentially inexperienced and unsuspecting users has a far greater chance of causing disorientation than the method I’ve been recommending.

If an author is intent on hardcoding _blank targets for external links, then, imho, the least they should do is add some kind of identifying phrase or icon to external links to indicate those which will open in a new window by default.

This would not apply for pages which are expected to be visited many times, where the user can learn the interface. It might well be appropriate where external links are the main object of a site ( directories, search engines, web rings, that sort of thing ). In these cases though, it’s normal not to offer a new window in any case, AFAIK.

Fwiw, Google does offer users the option to have links open in a new window.
The option is available in the preferences.

It is set to open in the same window by default and I’d consider that the right default setting for SEs as they are only a means to an end.
Once the user has spotted a likely link in the serps, they generally wish to leave the SE page and go to the linked site.

On subject of options, Firefox has a _blank blocker option:

Firefox has a built-in pop-up blocker that is activated by default. However, it doesn’t stop web pages from opening in new windows by using the target=“_blank” or the illegal target=“_new” properties. To force such links to open in the same window, add the following code to your user.js file:

// disable target=“_blank” (open in same window):
user_pref(“browser.block.target_new_window”, true);

And here’s a link

http://www.juliealbertson.com/targetblank2.html

It seems to me that browser options are a better way forward than changing existing standards, note the original wording

_blank
The user agent should load the designated document in a new,
unnamed window.

That is only a should, not a must. Even better might be a browser that loads the same window, but provides a mechanism to get back to the original site.

That browser is Safari which has had the ‘Snapback’ feature since January 2003.

It also has a native auto popup-blocker (as do all major browser other than MSIE)

I personally use the Saft plugin for Safari which offers me the option to force new windows into new tabs instead (amongst many other useful options).
No doubt there are plugins for Safari that force new windows to show in ‘this’ window, but for now, the Saft plugin options suit my preferred browsing style.

…fwiw. :wink:

I often visit the member’s websites while browsing sitepoint, and it always irritates me that the page opens in the same window. Yes, I know about right click, but I forget sometimes.

Offsite links here at SPf used to be set to open in a new window.
Some links within the forum interface are still set to open in new windows.
I’m not entirely sure of the logic to some choices.

Instead of right-click, why not use command-click (mac) / control-click (win)?
It’s much faster than waiting for a contextual menu to appear then accurately scrolling to the ‘Open link in a new window’ item.

I actually have my mouse software set to use the right button as command-click when using a browser.
Opening links in a new tab takes just a single, simple right-click.

MSIE now has a native auto popup-blocker.

There is a post somewhere with a link that sets SPF to open external links in a new window. I was just looking for it but can’t find it. I did it a while ago but when I deleted my cookies it didn’t do it anymore…

One thing I think we all agree upon: there is a time and a place for new windows. This is not a cut and dried rule, yay or nay.

What is different is how we perceive our audiences. What is ‘their’ objective in visiting our site. Can they achieve it without leaving or must they traipse around the web, following our reading suggestions?

How is the information on our site ordered? Do we list information topics and then segue them to the real meat of the matter on some other site after having exhausted the information on ours? Do we provide a basic description of facts and then direct them to our information source, or a more detailed explanation elsewhere? Is the external information supplementary to our own, or is it merely in support of our take on it?

I could go on… Depending on how some of these questions are answered, we already have some basis for our decision to send our visitors away, and on how we would have them return to add more to their plate until they are satisfied.

In some cases, a straight link out will suffice, especially if we are linking directly to the information they seek and they can readily return using the Back button. In other cases, we would like them to view our site (page) as a standing resource, in which case we would like them to keep our page in the background for quick reference.

I think a new window is justified in the latter instance, especially if the site to which we are referring our visitor is chaulk full of information whereby they will ultimately open more pages than can be easily ‘backed up’ through.

w3c-WAI Guidelines
10.1 Until user agents allow users to turn off spawned windows, do not cause pop-ups or other windows to appear and do not change the current window without informing the user. [Priority 2]

In this I believe that avoidance of new windows is recommended; however, when the occassion calls for it, we must be sure to inform our user of the change. Bill Posters mentions this, above. I don’t think it’s a sin to open a new window, as long as the user is aware that the existing one is still open, as well.

Then there is the other concern; to wit: some users have their screen resolution set so low that they require every window to be maximized just so they can see some of the content. Don’t laugh. I know of perfectly sighted individuals who cringe when they see a high resolution display. Why, is totally beyond me.

Both Kevin Yank and Bill Posters propose excellent solutions/workarounds. On the one hand, Kevin has created a very elegant solution that works around the deprecated target attribute, the proviso being that the user needs to be informed of the window change, either explicitly in the page, or at least in the title attribute. On the other hand, Bill has clearly given his visitors the option to choose.

Could Kevin’s method serve any purpose to the search engine robots, thereby creating an added benefit? This I absolutely know nothing about, so I ask in all earnestness.

It took me a moment to discover at which point Bill (Stewart) offers this option to his visitors, but once found I had no trouble understanding what the choice meant. Admittedly, there will always be users who cannot relate, especially new users, older users in particular, as these folks have little or no experience with new technologies and are easily befuddled (speaks for self).

My only concern with Stewart’s implementation is that the choice is not as explicit as it could be. I couldn’t find it at first because I had already scrolled the external link list and the checkbox was hidden ‘under’ the page. A minor flaw, to be sure, though one that caught me, all the same. Must be catching others, no?

As for ‘this being my site and I can do what I want–if you don’t like it go somewhere else’ mentality, personally I don’t agree explicitly with this, but I do agree implicitly. Maybe the site is meant for folks who have a closer connection to me or the information I am publishing. If the information is not for everyone, then why should I care if people leave or cannot figure out my site interface?

However, this does go against the larger aim and purpose of the internet, namely as a publishing medium. We are publishers, and have a duty to our audience at large to present our content in meaningful and accessible ways, without regard to our audience’s shortcomings. I think the letter and intent of the WAI guidelines is sound, and it is our interest to adhere as closely to these guidelines as is humanly possible.

It’s only a matter of time before user agents become sophisticated enough to act as advisor to the user, whatever their partidcular challenge. Soon enough, users will be able to tell their user agent which challenges they face, and the ua will automatically make the necessary configuration adjustments best suited to these challenges. Well, let’s hope this will eventually happen. We certainly have the AI capabilities, already.

‘Until user agents support’ is, imho a short term phrase in the guidelines. We are not there yet, though, so we still have a responsibility to anticipate some of the challenges of our visitors, and to accomodate them as best we can.

A quality post, tenfingers.

Critical mass reached. I’ve resituated the switcher so that it sits outside (above) the actual scrolling listings.
Dilberts everywhere can now breathe a sigh of relief. :wink:

(It’s a quick tweak and so far, I’ve only ticked-off on Safari, MSIE5/Mac and FF/Mac.)

As for ‘this being my site and I can do what I want–if you don’t like it go somewhere else’ mentality, personally I don’t agree explicitly with this, but I do agree implicitly. Maybe the site is meant for folks who have a closer connection to me or the information I am publishing. If the information is not for everyone, then why should I care if people leave or cannot figure out my site interface?

However, this does go against the larger aim and purpose of the internet, namely as a publishing medium. We are publishers, and have a duty to our audience at large to present our content in meaningful and accessible ways, without regard to our audience’s shortcomings. I think the letter and intent of the WAI guidelines is sound, and it is our interest to adhere as closely to these guidelines as is humanly possible.

I still can’t agree with that.
I don’t recognise that we have any duty whatsoever to those outside out target audience.
To state that the internet has a purpose and infer that all who publish on it should adhere to that purpose takes away the rights of self-determination from one of the few platforms that still support it.
I can’t disagree strongly enough in that the net/web should be fashioned, not according to a single vision or single ideal, but in terms as general or as specific as we choose it to be.

I don’t believe we should be ‘forcing’ people to ‘care’. I don’t believe we have the right.
By all means encourage us, enlighten and incentivise us and make us aware of the potential benefits of caring - practical, financial and moral.
But please, don’t try to tell me/us/them that the greatest opportunity for a free press and personal expression on the web now has restraints.
The web is not a private network, nor should it be subjected to rules as though it were one.
Neither is it publicly owned, so it should not be subject to govt legislation.
The point is that it is not wholly ‘owned’ by any one person, government, institution or group.

By enforcing the freedoms of one, we are limiting the freedoms of another.
By enforcing the inclusion of certain groups within our audiences, we risk diluting the specificity of the message we relate to our target audience.

Ideals should not be forced upon people if those ideals aren’t shared.
Dictating our audiences, methods and priorities goes against the spirit of the free web and if the web can be said to have any ‘purpose’, it must surely be partly based on the liberation and democratisation of communication and expression.

Sorry for the pseudo-rant.
It’s an issue I feel quite strongly about and is based on firm, reason views.
A focused search here at SPf would doubtless turn up a number of other ‘elongated statements’ ( :wink: ) I’ve made in defense of our right to build our sites according to whichever form of expression we choose.
It’s a philosophical position based on the fundamental freedoms that the web supports and encourages.
I believe that the attempt to alienate any one of us from that freedom is counter to the web’s true purpose and its greatest potential.

…and all that before breakfast :eek: :wink:

The general rule I use is to open new windows for links to other web sites and reuse the window for internal links. I use the target=“_blank” attribute. I suppose we could use JavaScript and also specify the target=“_blank”. Exceptions are to display larger images or additional information boxes designed to be viewed along with the primary page - I do use javascript with a target=“_blank” backup.

I do not like to rely on JavaScript in case it is turned off (most people don’t turn off I frequently do) and now popup blockers.

My 2 cents.

Thanks. We can certainly say the same for yours.

I take your line about Dilbert as a compliment. When our head is in the clouds it’s difficult to see the obstacles that are set to trip us up. Sometimes it takes a simpleton to stumble over the little ‘flaws’ we tend to overlook. Even Ziggy has a flash of genius from time to time. Wasn’t he the one who first observed that what a dog hears goes something like this:

“Blah, blah, blah, blah, Good dog, bah, blah, blah, blah, Good dog.”

If we give our audience too much credit, we may be missing more of them than we think. It is up to us to anticipate critical mass in advance, wherever possible.

You raise some good points. It’s tough to argue against “the liberation and democratisation of communication and expression.” Well, foolhardy, at least. I agree with you–that this reasoning is rock solid.

I don’t recognise that we have any duty whatsoever to those outside out target audience.

Excepting of course that we ought to adhere to at least some basic convention for the sake of the universality of the medium, itself.

Think of what books would be like if the table of contents were at the back and the index at the front, or there was no logical ordering of the chapters. One should find this rather confusing, or at least we would reason that there must be a more meaningful way to construct a book. Not the best analogy, I admit, though it does have parallels in the internet publishing world.

To state that the internet has a purpose and infer that all who publish on it should adhere to that purpose takes away the rights of self-determination from one of the few platforms that still support it.

Self-determination is our birthright. Just not at the expense of others. Without some semblence of purpose, the platform would lose all meaning. However vague that purpose may be, we are reaching out to an audience we cannot see or hear. It’s not as though we are standing on a soap box in the town square. Even while we take some stand on our views or our choice of entertainment we would still like some bang for our buck.

I don’t think we can come up with one subject that should exclude anybody from accessing the information or resource. Mind you, I doubt you will find too many seriously challenged individuals in specialized academic fields so there is some foundation to the aim for greater latitude and specificity as pertains to this narrow audience.

Flash movies are not intended for blind persons; nor is streaming audio intended for deaf persons. To foist a set of rules on developers that force them to compensate for these shortcomings is taking it a bit far. This is probably where standardization is falling short of the mark.

…the net/web should be fashioned, not according to a single vision or single ideal, but in terms as general or as specific as we choose it to be.

And it is thanks to this view that the web has expanded so rapidly with all manner of content. I’ll grant you that we cannot tell a painter what to paint or a singer what to sing (not in this half of the world, anyway). Thank heaven for that.

I don’t believe we should be ‘forcing’ people to ‘care’. I don’t believe we have the right. By all means encourage us, enlighten and incentivise us and make us aware of the potential benefits of caring - practical, financial and moral.

Some folks find it hard not to care, while others may exhibit a truly psychopathic absence of any form of conscience or consideration for others. This is the reality of the world. It may not be clear to some that it is in our interest to work toward the development of a coherent communication medium. Free of restraints, yes, just not devoid of standardized methodology.

No matter who the audience is, they will still seek some form of uniform experience across the web.

> Even if it’s an external link, you shouldn’t open new windows if people don’t want them to be opened. If they want to stick around on your site they’ll right-click and choose to open it in a new window.

I believe I should do whatever I want on my own site. If people don’t like it they can code their own sites.

A lot of users don’t know about right clicking to open a new window.

And Javascript isn’t a great option since not everyone has it.

It seems we are looking at the different aspects of target=“_blank” and I feel I should shed light on another.

I see it more as a convenience than anything. Personally, I like it when a new window opens. Typically I take that to mean that information is being made available from another site -or- another site it being opened.

As long as this isn’t abused, opening information in a new window is truly helpful, especially if you want to make sure that in the end that last browser they close (and will see) is your own site, the site they originally came to!

Mike

I recently started making web pages again, and was quite shocked to learn of target_blank’s deprecation; especially since I just made pretty liberal use of it on the site for both external and internal site pages.

   So I fired up 'find and replace' and used a simple javascript, an icon, and a css rule to mark all of the links on the site that would open in a new window.  I gave a brief explanation of what the icon was in a small but visible blurb on the home page.  I did this because I wanted the page to validate and I also wanted it to meet the w3c triple A rating for accessibility.

I have since been reading a fair bit more on the topic, and have read some very good arguments for and against the whole debate. I think, for now, it depends…

 But, I have decided to not open new windows anymore unless there is absolutely no way around it, or it is part of the requirements for the site (though I would try to inform a client of the ongoing debate and target_blank’s deprecation). 

I made this decision in a much different manner than I usually make decisions; I based it on faith. I usually want to see hard data before making decisions, but where the internet and information technology are concerned, there is simply too much hard data that even if I could go through it all I would certainly not understand it all. I have to take it on faith that the W3C are the people who are the most informed on the internets direction and actually influence its direction.

   I think there is an intricate network of possibilities out there based on a conglomeration of knowledge and with standards and recommendations followed we can help them all fit and work together better. Perhaps a bad or too often used metaphor, but if no one ever created standards for screw-driver heads… well, I think limits and costs would increase as far as screwing goes… 


 For whatever reasons (portability - your cell phone may not allow more than one window open; accessibility - it apparently conflicts or doesn't work very well with all the assistive technologies…) the W3C have asked that we stop opening up new windows and that we leave the choice up to the user (an increasingly more technologically savvy user as well). 

So my choice from now on is to include an icon that signifies external links; perhaps even an icon to links that are internal but the user may prefer, for what ever reason, to open it in a new window. And again, in a visible place (though not taking up too much front page real estate), I will include the icon(s) in a text box along with a little blurb about what the icons are and point out that if a user wants to open up a page in a new window then they should, depending on browser, right click and select open in new window, or tab, or, cntrl N, or whatever… and leave them with two things, a tiny bit of education and a choice.

Yes it is. It is also very annoying, which is why I’m using Mozilla where I can prevent stupid web designers from controlling how I open links. :cool:

Tabbed browser interfaces are becoming more and more common. Forcing a new window when the user may want a new tab is not very friendly. I’d say it’s outright rude. If you care at all about users with certain disabilities, you wouldn’t even dream of taking away the user’s control like that.

There is a good reason why the W3C deprecated the target attribute in the more modern DTDs. It’s not to make life harder for web designers; it’s to make life easier for the users. All those tricks using JavaScript to force a new window just so that you can feel good about validating with a strict DTD just show that you’re completely missing the whole point.

Deprecating the target attribute doesn’t mean that you should find a more complicated way to create popups. It means you shouldn’t create popups at all.

IMHO, of course. :smiley:

I disagree (and I think the W3C might disagree also).

Deprecating the target attribute from XHTML 1.0 Strict+ was done in order to farm that functionality out to other technologies - i.e. javascript.
The point is that assistive technologies will not recognise the js so won’t be bothered by instructions which they cannot handle.
By farming such things out to script, it is left for those platforms that can support it to do so, but in a way that still permits the user to override it (either by disabling js or using some kind of interceptor/blocker).

 [i]window.open()[/i] is still very much an active part of the W3C DOM.

If anything, this shows that, far from suggesting that ‘we should not be creating popups at all’, the W3C would (rightly) prefer us to use them appropriately in a way that doesn’t interfere with a site’s underlying usability and accessibility and in a way that keeps ultimate and detailed control with the user - for which js is perfect.

 [i]That's[/i] the point. ;)

Of course, it’s still not polite to use js to ‘force’ new windows on users, even though they do have the power to override that.
It’s generally accepted as ‘best practice’ that, if you encourage the use of new windows on your site, to provide the means for users to recognise and override links destined (by default) for new windows.
So, rather than force the user to use 3rd party solutions or to disable js in the prefs, simply offer them the means to switch (using js) within the page itself.
This way, you can get about as close as is possible to ‘pleasing all the people all of the time’.

Sure, separating structure (HTML), presentation (CSS) and behaviour (JavaScript) is a good thing which W3C promotes.

Sorry, but that’s not true. Take JAWS, for instance. It accesses the DOM through a browser, usually IE. Anything that IE “understands” will also be understood by JAWS, including JavaScript.

It is? :confused:
I can’t find a Window object in the W3C DOM. It’s not even ECMAScript. It’s JavaScript, which is not standardised by W3C or ECMA. It’s basically a legacy from Netscape.

I was deliberately provocative in my post, of course. There are legitimate uses for popup windows (as long as the user is warned in advance). Help texts for complex forms might be one such instance where a popup is the best solution.

However, forcing all external links to open in a new window whether the user likes it or not is not a good idea. At least one usability study from IBM shows that it may even be counter-productive for the most computer-illiterate users, who don’t realise that a new, maximised, window is overlaying the original window. When they try to use their old friend, the Back button, it doesn’t work of course. Thus they actually find it harder to return to the site which the designer so desperately tried to force them to stay on.