views:

469

answers:

5

Sometimes a user will click on a link on a page, and it seems that there is no reaction -- nothing is loaded. It turns out that all the links on that page is targeting a window name, such as "news_content". The user previously already clicked on a news headline, and so when the user now clicks on another news headline, that window (usually another tab nowadays) will load the news, but the original tab is still the one being shown. To the user, this seems like nothing is happening.

Are those websites using <a href=" ... " target="news_content"> ? Is it a good idea to use something like that, or can it be changed a little bit so that the focus will go to that tab instead of staying at the original tab?

(is it better that the browser always switch to the target tab? if so, then this problem looks like will be solved).

+5  A: 

In my opinion the user should always be in control of whether a link opens in a new window or not - If they're anything like me with numerous tabs endless new windows links are a mess.

What you seem to be asking is why the browser stays at the original page when a tab is updated with content, its simple, it sees it as another webpage, say you had a page that had realtime updating, your browser would not switch to that as it sees you are on another page - for all it knows you could be reading an article, watching a video etc.

All it takes to realise a different tab/window has updated is a little bit of awareness. With windows they would generally open over the current content, however as tabs are in one window this is not possible an it remains closed, but updated.

EDIT: In response to the title... I believe it to be better practice than opening something brand new each time however feel it should be the users choice whether to load a single new tab or stay in the same one. Hope this helps.

Oliver Stubley
+1 for user should always be in control
Perspx
+1  A: 

Link behaviour should generally be left to the user to control. In some situations, a case can be made for target="_blank" (especially now that Firefox, at least, has a "New pages should be opened in: A new tab" option), but setting all links to open in the same new window is just bad.

I, for example, hate waiting for pages to load, so I'll read down a page middle-clicking each link that interests me, which will queue them up in a series of new tabs. Five interesting links become five tabs, each loaded in the background while I'm reading the first article, so no waiting. If you make all five open in the same window/tab, though, then each one disappears when I call up the next and not only do I have to 'pick one, wait for it to load, read it, go back to the original article, repeat', but, if I don't notice that this is what's happening, then I'll also need to go back and make a second pass through the original page to re-find the links to the lost documents (or, more likely, just say "not worth my time" and never read them).

Forcing newly-opened tags to the front has a similar problem: I opened it in a new tab because I want it to load in the background while I continue reading the original document. Don't subvert my intention. I cleared the "When I open a new tab, switch to it immediately" checkbox for a reason.

Dave Sherohman
Don't left click if you see this happening then, just right click and select there, you must think that some may be in tab-less browsers (like most of those stuck back on IE6 in the 19th century) that will see each individual window pop up over the article, opening in one window or tab may be user preference as to not over crowd the browser. Depends on the general audience of the website though I guess.
Oliver Stubley
I'm sorry, but I don't see how "you can right-click and go through the context menu to force something resembling your preferences" is in any way a justification for ignoring preferences set by the user in his browser configuration. There's also the minor detail of sites doing this sort of thing often using javascript not-really-a-links which don't work in any way other than left-clicking because they're either not <a> tags or don't have the actual destination in the href attribute.
Dave Sherohman
+1  A: 

Yes, these websites are using target. Well. I can't imagine in which set of circumstances using the target attribute may be useful. But perhaps there's one. I haven't come across it.

Look, always switching to another tab solves the problem you describe, but it creates others. The biggest one is that switching to another tab may come as a surprise. Usability is by and large about never surprising the user. By the way, I greatly enjoyed the book "Don't make me think."

nes1983
A: 

The target attribute gives you errors if you try to validate against the XHTML strict 1.0 validator of W3C.

tharkun
+2  A: 

One caveat to add to the conversation.

I only use target= when I know the content is destined to be in an iframe and I don't want the link click to stay in the small window.

For example the graphs I embed here : http://webnumbr.com/stackoverflow-questions

Paul Tarjan