The History of the Web logo

Unraveling the web's story


Wait, what’s a bookmarklet?

An example of a bookmarklet in action

In 1995, Brendan Eich demoed what would eventually become JavaScript to a room full of engineers at Netscape. It was met with instant enthusiasm. For his demo, Eich opened up his version of the browser and typed a command right into the address bar, which opened up a console and allowed him to demonstrate an alert box. Six months later, the first version of JavaScript shipped with Netscape Navigator 2.

JavaScript in the address bar, as a protocol for a URL, was possible virtually from day one of the language, effectively creating JavaScript URLs. And even in the first version, “visiting” a JavaScript URL triggered a change on the current page, rather than opening up an entirely new one. Eich even added the void operator to an early version of JavaScript to make it possible to create arbitrary functions with values right in that URL.

To introduce new developers to JavaScript, Netscape released a comprehensive guide on how to use it. And in that guide, they included a short snippet about these JavaScript URLs:

You are probably familiar with the standard types of URLs: http:, ftp:, file:, and so on. With Navigator, you can also use URLs of type javascript: to execute JavaScript statements instead of loading a document. You simply use a string beginning with javascript: as the value for the HREF attribute of anchor tags.

<A HREF="javascript:history.go(0)">Reload Now</A>

In general, you can put any statements or function calls after the javascript: URL prefix.

So you ended up with this JavaScript quirk where it was possible to create unique URLs that ran a bit of JavaScript on whatever page you happened to be looking at. It could even make changes to that page. Move things around. Replace words. Open links. And pretty early on, people realized that these JavaScript URLs were also bookmarkable, just like any other URL.

And, crucially, easily shareable as links.

As rapid iteration spread through the early web, one corner of that world began experimenting with these bookmarkable, shareable JavaScript URLs to manipulate and transform web pages. Some early examples were used to quickly open all the links on a page, for instance, or run the current page through a validator. But there were also plenty of unique utilities as well, like interacting with online services, manipulating images on a page, or even tipping the website owner.

Early versions of the browser also featured something which has faded away in recent years. The bookmarks bar (or sometimes, the favorites bar). Up at the top of the browser window, below the URL, was a list of bookmarks. The easiest way to share a JavaScript URL was to drag one into your bookmarks bar, and then use it as you were surfing around.

An example of a bookmarklet in action

It is difficult to trace the exact moment that all of this began, but there did come a time when the concept—a shareable JavaScript URL that acted as some sort of personal utility—needed a name. In December of 1998, Steve Kangas did just that, when he launched Bookmarklets.com. And the bookmarklet (or Favlet, as it was called by Tantek Çelik) started spreading.

Even in the first few months, Kangas had a list of over a hundred bookmarklets to share, that he had compiled and created. Some could be used to search a page for specific links or text. Others could alter the appearance of a page, removing images, changing the color or making things more readable. Some were fun (a bookmarklet that could make a Valentine’s Day heart dance across the page) and some were unadorned and simple (turn text underlines on or off).

The category section of Bookmarklets.com

Bookmarklets are interesting. They are generally limited by browsers to a certain number of characters, which means they require efficient code that make use of the quirks of the language. They can’t be too complex or verbose. They usually have to be minified, which is a process of taking human readable JavaScript code and removing as many complicated variable names and whitespace as is needed. A Bookmarklet generally wasn’t able to do ten things at once. Each one did one thing, and did it well. That directness and focus made it all the more easy to share them around and instantly understand their utility. And bookmarklets became very popular.

Browsers have also typically featured another way to change and manipulate a page. They’ve been called add-ons, plugins, and extensions, but they are an officially supported way of interacting with a browser and extending its functionality. For a long time, however, they were difficult to manage and install. You had to find what you were looking for, download it, and find the right place to put it on your computer. They were useful cases, but not necessarily a viable alternative to Bookmarklets, which were easily shareable and dead simple.

In 2007, Moziilla Firefox released its Add-ons Gallery, a much simpler way to discover and install official Firefox add-ons. It was a searchable and categorized index of add-ons that any developer could add to. Add-ons were officially supported, were reviewed for security, and could be installed with one click. In 2009, Chrome added an extension gallery with similar features.

A first version of Firefox's Add-on Gallery

As those browsers rose in market share, extensions began to overtake bookmarklets in popularity. The Bookmarks bar faded to the background more. Bookmarklets are still in use, and still quite useful, but they are ….

Sources

Leave a Reply

Your email address will not be published. Required fields are marked *