Perfect Popup Links

1.0, 2004-09-22
Brian Lalonde

Example 1.1. A Perfect Popup Link

<a href="http://example.org/" onclick="return!window.open(this.href,'name','properties')">Link Text</a>

Note

The destination URL is provided as the href, not javascript: nor #. This approach will work for the widest possible audience.

Top Ten Benefits of The Perfect Popup Method

  1. Search engines have a better idea of what links exist. This is really important for Google.

  2. Link checkers can do their job.

  3. Browsers without multiple window support (or with a popup blocker) can still access the link.

  4. Browsers without JavaScript enabled can still access the link.

  5. Tabbed browsers can still choose to open the link in a new tab (e.g. middle-click).

  6. The links are compatible with offline browsing.

  7. Hovering over the link (or using a screen reader) reports the correct address, including the file's extension.

  8. Users can right-click to save a link target (rather than messing with an extra window).

  9. The link can be copied and pasted into an email, another browser, or a downloader.

  10. No phony jump link is actuated (adding a confusing entry to the history, and scrolling back to the top of the page), nor even required.