Jakob Nielsen has likened opening links in a new window to a vacuum cleaner sales person who starts a visit by emptying an ash tray on the customer's carpet. Now I wouldn't say that it's quite as bad as that, but it can be pretty annoying when you click a link and suddenly out of nowhere a new window appears.
Unfortunately, opening links in a new window is still quite a common occurrence on the web. Many websites do it, and I'm sure many will continue to do it. Before you follow their lead, take a few moments to think long and hard about whether it's the right thing to do.
Why not open links in a new window?
Here are my top five usability reasons why you should beware of opening links in a new window:
- Unless you warn them, web users are likely to expect the new page to load in the current window. Unexpected surprises can be fun, but not when you're browsing the web.
- Using a new browser window resets the back button in that window. The back button is the second most used navigation function (after following hyperlinks) (source: useit.com) so resetting it is a big no no.
- Opening a new browser window can be disorientating for very novice web users and for those who are visually impaired. They might not realise that a new window has opened and might struggle switching between windows.
- Using a new browser window is a little disrespectful to web users. If they want a new window, they'll ask for one. Don't force a new window upon users unless there's a very good reason to do so.
- Using new browser windows can make an already cluttered taskbar, even more cluttered and difficult to use. We've all spent ages hunting through the taskbar, looking for the window we want. Don't make this even harder by increasing the number of windows to look through.
But won't using new windows keep people on my website?
Not on its own it won't. Web users will stay on a website because it has the information they're looking for, or because it helps them achieve their goals, not because the browser window is still open.
If someone wants to go back to a website they'll use the back button. If a new window is used the back button in this window gets reset, so web users won't be able to do this (cue frustrated users).
So what should I do?
The short answer is: Think long and hard before opening links in a new window. If you still think that using a new window is a good idea then you really have two options:
1. Warn the user that the link will open in a new window
At least if you warn the user that the link opens in a new window, it should not come as such a surprise. There are a number of ways you can do this:
- Use the
href titleattribute to let the user know that the link opens in a new window.
The code for this would be:
<a href="#" title="Opens new window">Webcredible</a>
- Use text to indicate that the link opens in a new window e.g.
Webcredible (opens new window)
- Use a small icon and text to indicate that the link opens in a new window e.g.
Webcredible (opens new window)
As far as usability and accessibility is concerned, using text and an icon is the best solution. An icon is easier to spot than just text on its own and the text lets users know what the icon indicates. The text will also be picked up by a screen reader, so that visually impaired users are warned that the link opens in a new window.
2. Provide an icon that opens the link in a new browser window
Whilst this is a good idea because it leaves the choice up to the user, unfortunately it's a little unclear whether the link text (i.e. “Webcredible”) opens in a new window or not. This is why it's important to include text such as “(opens new window)” if the link text also opens in a new window.
So when can I open links in a new window?
Believe if or not there are instances when using a new window is a good idea. This is the case when:
- The link is for a document, such as a PDF or a Word document. Using a new window means that the document will download in the background and also prevents users from accidentally closing the browser window when they close the document.
- The link is for a large image. Using a new window means that the web user still has a browser window open, whilst the image is being downloaded.
- The link is for a printable version of an article or web page. Using a new window allows users to keep the current window open, whilst they print the article or web page in the background.
For these instances use text and an icon to indicate that a new browser window will open e.g. Printable version (opens new window)
Think very long and hard before opening up links in a new window - most of the time using the current window is by far the better solution. If you do need to open links in a new window then at least warn users beforehand - unless that is of course you want to give your site visitors a rather unwelcome surprise!