Unfortunately that doesn't work (that was actually the first approach I tried). The localStorage calls all succeed on iPad--they just don't persist across page reloads :(
On a previous version of Safari, they would all fail and you could detect it, but that's not the case anymore...