[X]

Bookmark This Page

browser tricks 1998 dead

A link that adds your site to the visitor's favourites.

In 2026: Dead. window.external.AddFavorite was Internet Explorer only and was removed. No browser lets a page write a bookmark any more. The best you can do is tell them the keyboard shortcut.

Where it came from: Microsoft Internet Explorer 4 external object, MSDN, 1997. MDN

<script language="JavaScript">
function addBookmark() {
  if (window.external && window.external.AddFavorite) {
    window.external.AddFavorite(location.href, document.title);   // IE only
  } else if (window.sidebar && window.sidebar.addPanel) {
    window.sidebar.addPanel(document.title, location.href, "");   // Netscape
  } else {
    alert("Press " + (navigator.platform.indexOf("Mac") > -1 ? "Cmd" : "Ctrl")
        + "+D to bookmark this page.");
  }
}
</script>

<a href="javascript:addBookmark()">Bookmark this page!</a>
sandboxed demo · breaks nothing but itselfrestart

More in browser tricks

all 25 in browser tricks › · the whole library ›