Over a million developers have joined DZone.

"next Gen" Bookmarklet

DZone's Guide to

"next Gen" Bookmarklet

Free Resource
With this code, create "next generation" bookmarklets.

The good points are that :
- the code is remotely loaded (so updatable and more simply testable)
- you have no length limitation 
- you can dispatch the code in various libaries

To disable the browser cache, we've added a random parameter in the the last javascript url. For performance, it's better to not disable the cache but it's very useful when testing.

baseurl = 'http://example.com/bookmarklet/';

var scripts = new Array(

baseurl + 'date.js',
baseurl + 'encoding.js',
baseurl + 'http.js',
baseurl + 'bookmarklet.js?x=' + Math.floor(Math.random() * 9999)


for (i=0;i

Past the code above in a bookmarklet crunchinator to generate the bookmarklet. http://ted.mielczarek.org/code/mozilla/bookmarklet.html

Not fully tested. It may have some issues.

Opinions expressed by DZone contributors are their own.


Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.


{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}