You are here:

  1. Manual
  2. Development
  3. Links and navigation
  4. New windows

Links and navigation: Links and new windows

By means of a few additions to the markup for links, web developers can determine whether a link followed by the visitor opens in the same window or in a new one. In general web developers restrict new windows to external links, links that lead to locations outside the original website.

Reasons for automatically opening new windows

The idea behind a link that automatically opens in a new window is to ‘keep the visitor on the site’ and to comply with the visitor’s surfing habits.

  • Keeping a visitor on the site.
    A visitor who clicks on an external link is automatically confronted with a new window (whether he is aware of it or not) in which this location is loaded. Once the visitor has finished surfing on this new website and closes the window, he will see the window of the original site.
  • New windows are practical.
    Many web users have learned from experience that opening a link in a new window often is very practical. For example, people may want to follow several links from a page containing search results. This surfing behaviour led to the idea that the web developer is doing the visitor a favour by automatically opening links in new windows.

Disadvantages of automatically opening new windows

  • Opening new windows automatically, limits the visitor's freedom of choice.
    Visitors should be considered capable of opening links in new windows themselves if they want to.
  • Opening new windows automatically confuses the visitor.
    If a new window is opened, it is not possible to return to the original site from this window by means of back button, the most frequently used function in a web browser. While some visitors may not know how to open new windows themselves, they are all familiar with the back button. An attempt to prevent the visitor from getting lost can acutally increase tje risk of getting lost. Opening new windows automatically thus creates more problems than it solves.
  • Opening windows automatically hinders accessibility.
    It is extremely difficult for visitors with a cognitive or visual impairment to figure out what is going on if a new window suddenly opens.

“Users deserve to control their own destiny. Computers that behave consistently empower people by letting them use their own tools and wield them accurately.”

Guidelines for links and automatically opening new windows

Links on websites should not automatically open new windows without warning.

Guideline R-pd.8.14

“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.”

When to open new windows automatically

Do not open any new windows automatically, unless the location of the link contains useful information that may be necessary during an important uninterruptible process.

Guideline R-pd.8.15

For example, a page containing an explanation or conditions needed during the completion of a survey or a response form. Visitors who follow the link to this information can return by means of the back button, but there is a good chance that the details they entered before will be lost. Automatically opening the link in a new window nearly always comes in handy here. In that case inform the visitor that the link will be opened in a new window.

Web developers should not hide information that is essential for the visitor to complete such a process behind a link, but should instead place it within the process itself. If necessary, the information can be made visible and hidden again by means of client-side scripts and CSS (Cascading Style Sheets).

Links that do not automatically open a new window

Links for which automatic new windows are an option can also be presented as two links: one without and one with a new window.

Hybrid solution: a link without an automatic new window and a link that automatically opens a new window.

Read our general terms and conditions (new window).

This manual yields no further information about the techniques or markup for automatically opening new windows.

Links and references

Eliminating confusion among visitors concerning external links

Visitors can decide for themselves whether they follow external links in a new window or tab. For the visitor to be able to make a decision, it is important that (s)he is aware that the link is external.

Explaining the use of the web browser

Alternatively, visitors can be pointed in the right direction by explaining to them the use of their web browser, if applicable. This way visitors who were not yet familiar with the functions discussed can learn something that will be useful to them on every website they visit.

Make sure this explanation is as general as possible. If it applies to a specific browser or operating system, users will be excluded.

Of course, an explanation about browser functions does not have to restrict itself to following external links; it can also deal with downloading files or sending an e-mail message.

(Explanation)


Web Guidelines version 1.3, November 2007.