Google Gears – Offline Functionality for Web Apps

Google Gears Logo

There has been many ideas about a offline storage mechanism for web applications. Dojo implemented this in its Library. Firefox 3 promises this. Now we have a new arrival in this area – Google Gears. Unlike Dojo’s implementation, Gears require an extension for it to work.

Google Gears is an open source browser extension that lets developers create web applications that can run offline.

See Gears In Action

To see Gears in action, first install the extension…

Google Gears

Then go to Google Reader – you will see a ‘Offline’ mode button in the top right corner. If you click on that the script will download 2000 entries into your local database(SQLite).

Downloading Online Entries using Google Gears

To see this database, open up the Firefox Profile folder and enter the ‘Google Gears for Firefox’ folder. You will find many Database files there. Just open any of these in a SQLite V3 supporting viewer.

After the download is complete, you can use the Reader without a net connection.

When you get the connection back, just click on the same button – all the changes will be send to the online server.

Syncing Local DB changes with online server in Google Gears

Advantages of the Google Gears

  • Once the extension is installed, the script will work across all the supported browser. No JavaScript hacks required.
  • Full featured Database support – this makes it much easier to work with.
  • Supported by Google
  • Open Source

Disadvantages of Google Gears

  • The user must install an extension for this to work.
  • Requires user action before going offline. If your connection breaks suddenly(as it often happens here in India), you are left with nothing.
  • All browsers are not supported(yet)
  • Beta software – some bugs are to be expected. But, this will be solved in time.

I am still exploring the code – expect a new post with working javascript examples soon.

Google Gear Links

About Binny V A 102 Articles
Freelance Web Developer on the LAMP Platform. Maintains a blogs http://blog.binnyva.com/. Other sites include Bin-Co and OpenJS

1 Comment

  1. How is this (plus the two competing frameworks you mentioned) different from using the userData object present in IE since 5.0 (except for the size limit), Flash local storage, and Silverlight isostorage?

Leave a Reply

Your email address will not be published.


*