Forum Moderators: phranque
Is this perceived to be bad practise? What are the feelings on this?
I'm guilty of using them from time to time, but try to use them very sparingly.
My biggest argument is in terms of usability. New users often don't realize a new window has been opened. If they're surfing with the browser at full-screen then often you're breaking their back button. I still get calls from people insisting that their browser's back button won't work when it was just another inconsiderate webmaster using the target in their links again.
If you set your DTD to XHTML Strict then there is no more target allowed. I think they did that on purpose. ;)
I often see references to links that open pages in new windows (target="_blank") as being realy bad.
I generally like it. For example, a few minutes ago I was reading a post on WW and it had a URL. I followed the URL to an external site and would have much rather it opened in a new window.
However, when navigating within a site, I want the current window to be used.
In short, my personal preference as a user is for:
Same site. Same window. New site. New window.
Matt
I ran a poll on one of my sites though and offsite links in a new window won by a very slim margin.
What I ended up doing was setting offsite in a new window by default with a checkbox to change that setting if a visitor feels the way I do about them. The preference was saved in a cookie so it worked for that visitor through the entire site.
Seemed to keep everyone happy, no more emails are arriving with complaints for either side :)
If you want a link on your site (especially a link leaving your site) to open in a new window, you might want to note, parenthetically, that "this link will open in a new window", so the user has fair warning.
Just my opinion; I could be wrong....
Eliz.
What I can't stand is overly scripted sites that break this ability, by (a) disabling the right-click, or (b) using a Javascript event that doesn't work with right-click.
If a link occurs in a block of text and jumping to that link would 'intrude' on the experience of reading the block of text then the link should open in a new page.
If the link may take a long time to load (pdf, unreliable external site, etc) it should open in a new window.
If the link diverges too much from from the current topic in the content then it should open in a new window - plus you should be asking why on earth you're linking it in the first place.
It's mostly just a personal preference. If I click out of a site and it opens a new tab / window, it's irritating to have to flip over to close the one I was leaving.. and when I do that I lose the convenience of the back list. (Yeah, I know there's history, and yes I do use extensions to keep better details about sessions and closed tabs, but it just adds more effort that was never required if it had just opened the link where I'd wanted.)
I've watched a lot of newbies using the web as well, and they often get confused by new windows and often can't find there way back. Closing the browser is counter intuitive to find where they had been. They aren't expecting the other window to be beneath.
Another group is the disabled communities, blind readers from what I hear don't often react well to new windows. I haven't tested them, but it seems like it could be an issue.
For me it comes down to a strong personal preference, I know many people feel differently, but the browser not doing as I expect drives me up the wall. That's why I choose to use a script to block it from happening, and use target alert to give a quick visual clue if the link isn't just a normal path to a new page (ie. a new window is opened, a pdf, email etc.).
I'm ok with small resized pop ups onclick, those often make sense so I allow those through. Like I said though, this is just a strong personal preference. Luckily I know how to alter my browser to work exactly as I like it to. Not everyone else knows how, or bothers to take the time to though.
With all that said though, I often do middle click links to open a new tab if I want to continue where I was after browsing the other content, but I really believe that should be a visitors choice.