How to Use Google Docs Offline in Safari
It’s ironic that with all the writing I do, I’ve never settled on a single word processor, instead picking and choosing among lots of different ones depending on the task at hand. Although it’s a mediocre word processor, we’ve started using Google Docs for certain sorts of collaborative writing, such as when Tonya and I are working on marketing materials for Take Control, or when I’m writing an article for Macworld. Its brilliant collaborative capabilities more than make up for its minimal feature set, and I have found it better for my needs than similar products like Zoho Writer and Buzzword, which don’t seem as focused on enabling quick collaboration.
Like all online word processors, Google Docs has one significant architectural limitation: if you don’t have Internet access, your documents are completely unavailable to you. Google has been working on eliminating this limitation with a technology called Google Gears (Zoho Writer and a few other Web apps also use Gears – it’s an open source technology that any developer can implement). Gears addresses the disconnected problem with a database engine based on SQLite, and Gears-enabled pages can send and receive data from this local database cache when offline. When connectivity is reestablished, Gears synchronizes the changes back up to Google’s storage cloud.
Gears has been available for the Mac via the Firefox Web browser for some time, but Google just released a “beta” version of Gears for Safari. (Nearly everything Google does is labeled as beta, even after years of development and millions of users, which makes it difficult to determine the actual state of the code.) I had tried Gears with Firefox briefly before our trip to Wales, but I found it a bit confusing and hadn’t come back to it until this Safari release, which I suspect will be attractive to more Mac users anyway. The Safari release was quiet, and Google’s Gears home page doesn’t yet acknowledge
that it’s compatible with Safari.
Gears for Firefox is a Firefox add-on, but for Safari, Gears has two parts, an input manager (installed in /Library/InputManagers) and an Internet plug-in (installed in /Library/Internet Plugins). Some people don’t like input managers; if so, stick with the Firefox version.
Installation and Setup — Until Google officially releases Gears for Safari, you can’t follow the normal installation method, which is to visit the Gears home page and click the Install Gears button (do that if you want to install in Firefox now). Instead, download this disk image and run the installer inside. You’ll have to restart Safari to finish the installation. Gears automatically updates itself, so when Google releases new versions, you should just get the updates. You can also verify that the installation has worked by looking for a Google Gears Settings menu item in the Safari application menu. But don’t choose that just yet.
Instead, go to Google Docs, and at the upper right of the page, click the Offline link next to your email address to continue the installation process in a series of dialog boxes.
First, Google Gears asks you to enable offline access; click the Enable Offline Access button. Next, Gears asks if it’s acceptable to store data on your computer (necessary, of course, but nice to be asked). Select the “I trust this site. Allow it to use Gears” checkbox and click Allow.
Gears then asks if you want to make a desktop shortcut, which isn’t necessary, and can be done later if you want. The desktop shortcut is actually a small application that’s created on your Desktop, but it doesn’t have to stay there. Double-clicking it opens Google Docs in the Web browser that was your default as of when you created it; it isn’t smart enough to switch if you change your default, but you can recreate it if necessary. Merely dragging the Google Docs URL from Safari’s address bar to the Desktop to create a .webloc file provides exactly the same functionality as the Google Docs application that Gears creates.
Once all that is done, Gears synchronizes your data, which shouldn’t take long unless you have a vast number of documents stored in Google Docs. Subsequent synchronization takes place regularly, and you’ll likely never notice it.
Basic Usage — If Safari is open, you can just navigate to http://docs.google.com/ manually, via .webloc file, or via the Google Docs application that Gears creates. Once there, click any document to open it, make changes as you would normally, and when you’re done, click the Save & Close button. Keep in mind that you can edit only word processing documents; spreadsheets and presentations can be viewed offline but not edited yet.
Google uses only a tiny icon that switches between a green checkmark and a gray slashed circle to indicate whether you’re online or offline in the main Google Docs file list. Unfortunately, that icon doesn’t update quickly, so even after I disconnected my Mac from all networks, it claimed I was online for a few minutes before realizing otherwise. Similarly, when you’re in a particular document, a green, downward-pointing arrow indicates that the document is in sync; a gray, upward-pointing arrow tells you that there are changes that need to be saved next time you connect. Maybe it’s just because I’m feeling my way around what it’s like to work offline in an online word processor, but I would have appreciated more obvious status
Edited documents do get a little “Edited offline” tag next to them in the Google Docs file list, and shortly after you reconnect to a network, Gears notices and synchronizes your documents back to the cloud, erasing the “Edited offline” tag at the same time.
Note that if you choose to install Gears for both Firefox and Safari, the two don’t share the same data store. In other words, if you make a change in a document in Safari while offline, you won’t see that change in Firefox until the Safari version is synchronized back to Google Docs. That’s not unreasonable, but for those of us who use multiple Web browsers regularly, it could cause some confusion.
Protecting Against Beta — My only concern about the pre-release nature of Gears is that I’d hate to lose a plane ride’s worth of work should something go wrong. I haven’t used it much, and although I haven’t had any problems, I do worry a bit, since Gears is saving to a database, not a normal file that you could extract easily if necessary.
Of course, you can always copy the text and work on it in TextEdit or some other simple word processor, but what I’m considering instead is using a utility like Keyboard Maestro or CopyPaste Pro that maintains a clipboard history. Then, every so often, as a backup, I’d just select all and copy.
Needless to say, Gears is free, as is Google Docs, and it requires Safari 3.1.1 or later on Mac OS X 10.4.11 or 10.5.3 or later. Even if you don’t plan to use Google Docs offline much, I’d encourage you to give it a spin, since it might let you get some work done at a time when you’d otherwise be dead in the Internet water.