Google Gears for WebKit

Thursday, May 31, 2007 at 10:06 AM

Posted by Dan Waylonis, Mac Software Engineer

Have you heard about Google Gears? It's an extension to your favorite web browser and a new open source project from Google. It adds support for local data storage and helps web application developers manage resources so you can make your web application work offline. It is currently available for Linux, Windows, and Macintosh platforms and you can learn more at I got a chance to work on this product for WebKit, which is the render engine Safari is based on, and we're happy to announce that the source code is available to all Mac developers today.

Since Google Gears is leveraging the latest technology from WebKit, it is currently not compatible with the shipping versions of Safari (Mac OS X 10.4.x and 419.x). So, if you want to play with Google Gears for WebKit, you'll have to download a recent WebKit build from

How it works

Google Gears for WebKit is made up of an Internet plugin for Webkit or Safari (Gears.plugin) that's installed into /Library/Internet Plug-Ins and an InputManager (GoogleGearsEnabler) that's installed into /Library/InputManagers. The GoogleGearsEnabler ensures that Google Gears can provide resources to web applications. It registers a NSURLProtocol class only if the OS X Application is a supported version of Safari or WebKit. Once installed, the registered class will check any URL requests to see if Google Gears can provide the content. If so, it will intercept the call and provide the data. Otherwise, the URL will be processed normally. This is how Google Gears is able to work when you're not connected to the Internet.

Google Gears is an open source project and we're working with partners like Adobe, Mozilla, Opera, and others to make sure this is the right solution for users. So come check it out for yourself at and help us make it even better for WebKit and Safari.