JavaScript - - By Kevin Yank

Store large data client-side with AMASS

The AJAX MAss Storage System (AMASS) is a clever blend of JavaScript and Flash that doesn’t actually have anything to do with AJAX — except that it will help decrease the amount of AJAX you have to use to produce Web applications with rich user interfaces that behave like desktop apps.

AMASS inserts an invisible Flash movie the page in order to borrow a feature from the Flash Plugin, expanding JavaScript’s local data storage capacity (data stored on the end user’s machine, rather than on the Web server) from the 4KB offered by cookies up to 100KB, or even to any arbitrary size if the user grants permission when prompted.

Just what is this useful for? Well, with the amount of data users are typing into Web pages these days, features like undo and auto-save are starting to become vital, and AMASS makes them much easier (and less costly) to implement.

Gmail recently added auto-save to its offering, saving a draft copy every few minutes as you work on an email, so that you don’t lose your work if your two-year-old runs in and jabs the reset button on your computer again. Gmail implements this by periodically sending a copy of your work-in-progress to the server, but that’s a lot of bandwidth for such a simple feature. The reason for sending it to the server is that, traditionally, JavaScript was limited to 4KB of local data storage. Depending on how you use your email, messages over 4KB could be routine. With the expanded capacity offered by AMASS, this limit need no longer apply.

In its initial test version, AMASS supports Internet Explorer 6, Firefox, and other Mozilla-based browsers on Windows only. Linux is untested, and there are known problems on the Mac. Still, it’s an innovative idea that may pan out into a useful tool if the author can solve the compatibility issues.

Sponsors