Opening New Browser Windows

Many hypertext systems allow documents to specify that a link should open a new browser window, either through a special kind of hyperlink, a hyperlink attribute, or through a scripting language:

  • In Amigaguide, new windows can be opened through the ‘alink’ tag — for example, @{“Link text” alink ‘node’}
  • In pure HTML, new windows can be opened using the ‘target’ attribute of the ‘a’ element &mdash for example, <a href=“URL” target=“_blank”>Link text</a>
  • In HTML combined with the Javascript scripting language, new windows can be open using the ‘open’ method of the ‘window’ object — for example, window.open(‘URL’,‘window name’,‘attribute list’);

Tricking the visitor

In many cases, a new window is opened in order to keep the visitor on a particular website — if the visitor doesn’t realise that a new window has been opened, then they will continue browsing in the new window and when they eventually close it they find that there is another window behind with the original website. Like pop-up windows, this trick hardly ever works and is more likely to make a user decide not to come back to a website (this is why none of the major e-commerce sites use pop-up windows).

Breaking the back button

The back button is a vital part of most hypertext browsers. When a link opens a new window, the back button of the new window cannot access the history of the previous window, breaking one of the major ways of navigating hypertext. If users don’t realise a new window has been opened, this will mean they cannot find their way back to the original document — on the internet, this will mean they will probably move onto another website that has a better interface.

Warning users — a partial solution

If, for some reason, opening a new window is absolutely necessary, the link should alert the user in some way. Many websites use a small icon representing a window to show this — in this case it is important to give the icon suitable alt-text and set the title attribute, and preferably make the icon part of the link. Howerver, this can still confuse people new to the internet, and there are other usability problems.

Windows and tabs

Current operating systems have poor window management capabilities - even the ability of Windows XP to group windows from the same application does little to improve the situation. As a result it is better not to open new windows unless absolutely necessary. Many modern web-browsers such as Mozilla Firefox implement a system of tabs to make navigation easier — several pages can be open simultaneously, with a set of tabs (usually shown at the top of the window) allowing the user to easily switch between the pages. Tabs also allow a user to open a new page in the background &mdash unlike windows, which open in the foreground. The use of Javascript to open a new window prevents the user from redirecting the request to a new tab, or to save the link target to their computer (although in future versions of Mozilla Firefox the user will be able to configure the browser to make calls to window.open() open a new tab instead).

Power to the user

The best solution is to make link text descriptive, and allow the user to decide whether to open a new window (or tab). Users with a slow internet connect may want a large image to download in the background while they continue browsing, whereas users with a fast internet connection may be willing to wait for a couple of seconds. Users may want to save a PDF file to their computer to view later, rather than view it now in a browser window — this is prevented by using Javascript to open a new window.

For more information on links, scripting, and other usability issues, see Jakob Nielsen’s excellent book, Designing Web Usability:

This article was last edited on 9th April 2007. The author can be contacted using the form below.