What is Bookmarklet? and Bookmarklet Example

What is bookmarklet? Did you ever used it! I believe you have used it. When you dragged a button or link to your web browser bookmark area then you used bookmarklet. Bookmarklet is Bookmark + Applet.
Bookmark is based on [JavaScript: Js code] in browser Address Bar. As we can run JavaScript code in address bar, we can save the JavaScript code in Bookmark and the code will run when get clicked.


Now, when this link is dragged into bookmark area of Firefox then this Bookmark will be saved there for use. On clicking on the bookmark, script saved in that will run. Script inside is :

Bookmarklet are useful for shortcut way. Suppose you use bit.ly for shorting URL for tweeting or mentioning on any document. So, this Bookmarklet can be used to create a shortcut of the current visited page by Bit.ly on the fly.


Use this bookmarlet (bit.ly). Drag it onto your bookmark area of Firefox. For IE, right click and use "Add to Favorites". Click on that bookmarklet when you are on the page you want to shorten the URL for and see what happens!

I got the bit.ly idea from Matt Cutts.

Comments are open for an year period. Please, write here on Facebook page.