Nolan Lawson

By: Nolan Lawson
Published: 22 September 2014

As Cupertino fans snuggle up to their bigger and better iDevices, PouchDB users will appreciate PouchDB 3.0.6. This release contains a workaround for some unforeseen hiccups in Apple's new implementation of IndexedDB for Safari 7.1 and iOS 8.

Apple introduces IndexedDB support

All joking aside, we are happy to welcome Apple to the IndexedDB party (better late than never!), and we are working with the WebKit devs to resolve the issue. In the meantime, PouchDB 3.0.6 provides a workaround where we fall back to Web SQL on Apple browsers.

Other fixes in this release:

  • db.compact() performance improvements (#2623)
  • Ensure attachments work after Chrome 38 upgrade (#2773)
  • Invalid/unauthorized documents no longer halt replication (#2268)
  • Filtering no longer halts replication (#2689)
  • Update lie dependency to 2.8.0

New features in this release:

  • db.info() shows whether auto_compaction is set (#2744)

An aside on browser compatibility

From the get-go, PouchDB's goal was to work seamlessly on every browser, with one API to rule them all. I like to call it the "jQuery for databases" approach.

In practice, this is pretty tough to achieve. I poke fun at Apple, but there are also bugs in IE's implementation of IndexedDB (here are three), Firefox's implementation (this one), and Chrome's implementation (these two). Additionally, some Android devices ship with an outdated version of IndexedDB in the notoriously non-evergreen "stock" browser.

And that's just IndexedDB! Don't even get me started on Web SQL. Here's just a small taste:

We've written workarounds for all these issues in PouchDB, so that you, dear developer, need never worry your pretty head about them.

So this new Safari/iOS bug doesn't phase us. If we were keeping score, this would probably be workaround #72 by now. We're used to it.

However, that doesn't mean we should get complacent. All of these bugs are opportunities to hold browser vendors' feet to the fire, so that eventually the hacks and workarounds are no longer necessary. You don't want to have to download 10KB of workarounds just to use the native HTML5 APIs. And nobody wants to see HTML5 sink under the weight of browser quirks and non-compliance.

We look forward to removing most of these workarounds from PouchDB (including Web SQL support!), so making some noise in the Microsoft/Mozilla/Chromium/WebKit bug trackers is a great way to get there. Submitting test cases and pull requests is even better.

Thanks to Elmer Bulthuis and Kyaw Tun for finding reproducible test cases to submit to the WebKit devs. Let's move the web forward!

And as always, thanks to our new and existing contributors.