Google Gears is a browser extension that embeds an SQLite database into a browser to enable web application to even run when there is no internet connectivity. I think this is a great idea, once it (would) come by default with every web-browser.
I'd like to think about alternatives. I think the easiest alternative is to have a local web-server running on your system, which serves the client-side web-application even if there is no internet-connectivity. This of course requires parts (or the whole) of the server side to run under this local web-server. And thats my idea. Imagine you have your photos stored on Flickr. Do you trust them? I feel better when I have my photos at least backed up on my local system. And it's also much faster to show other people your photos once they are cached locally. So the idea is to have "two" servers. One locally and one globally. They synchronize each other, so that you can fully work offline without any need to change one line of the client side code. This of course means that you better open-source your "application", or you encrypt it so that no one can decipher it, if you prefer to protect your investments.