Bookmarklet
From Social Patterns
Contents |
Example
Facebook invites its users to install a bookmarklet for sharing content on their site from around the web.
What
A bookmarklet is a small computer application, usually written in Javascript, and stored as the URL of a bookmark in a web browser or as a hyperlink on a web page. Bookmarklets are designed to add one-click functionality to a browser or web page. When clicked, a bookmarklet performs some function, one of a wide variety such as a search query or data extraction. The term is a combination of the terms bookmark and applet.
When
Bookmarklets work well for dedicated users already in the habit of sharing and looking for more convenient ways to do so, but they may also work for recruiting new sharers, if well presented (otherwise, first-time use of a bookmarklet tends to be rather unintuitve.
How
Web browsers use URIs for the href attribute of the <A> tag and for bookmarks. The first part of the URI, such as http:, file:, or ftp:, specifies the protocol and required form for the rest of the string. Browsers also implement a prefix javascript: that to a parser is just like any other URI. Internally, the browser sees that the protocol is javascript, treats the rest of the string as javascript code which is then executed, and uses the resulting string as the new page.
The executing script has access to the current page, which it may inspect and change. If the script returns an undefined type rather than a string, the browser will not load a new page, with the result that the script simply runs against the current page content. This permits in-place font size and color changes, for example, without a page reload.
"Installation of a bookmarklet" is performed by creating a new bookmark, and pasting the code into the URL destination field. The bookmarklet can then be run by loading the bookmark normally, or dragged to the browser's bookmark toolbar.
Extensible browser plugins such as the Delicious add-on for Firefox represent a more sophisticated approach to the bookmarklet concept:
The Delicious add-on for Firefox is like a bookmarklet on steroids.
Why
Bookmarklets make sharing easier, thus reducing the friction for the user and facilitating more activity on the network.
Related Patterns
As Seen On
- Delicious
- blog software
- Twit This
Sources / Similar Patterns in Other Libraries
- Resources
- Bookmarklets Home Page
- Jesse's Bookmarklets Site
- Samrod's Functional Bookmarks
- Chinesenotes.com Bookmarklets for Chinese Text Search
- Information
- http://en.wikipedia.org/wiki/Bookmarklets
- Bookmarklets Boost Web Surfing, PC Magazine, Tara Calishain, 2004-03-04. Retrieved 2007-08-31.
- Web 2.0 Glossary

