On Thu, Jan 27, 2011 at 12:47 PM, João Eiras <joao-c-ei...@telecom.pt>wrote:
> On Thursday 27 January 2011 20:39:50 you wrote: > > On Thu, Jan 27, 2011 at 12:06 PM, Charles Pritchard <ch...@visc.us > <mailto:ch...@visc.us>> wrote: > > FWIW: websql is mostly abandoned, though super handy on ios mobile > devices. > > > > It's been around for a while in everything other than FF and IE. > > > > IndexedDB is live in Chrome, Firefox and the MS interop team released a > prototype for IE. > > > > For the record, we haven't shipped it to stable yet, though we do have a > version in the dev channel. We're hoping to ship before long though (once > we get the API back up to date). > > > > Moz and webkit both just implement IDB atop of their internal sqlite > processes. That is, thy create a simple websql schema. > > > > For now, yes. It's actually pretty fast though! > > > > > > On Thu, Jan 27, 2011 at 12:31 PM, João Eiras <joao-c-ei...@telecom.pt > <mailto:joao-c-ei...@telecom.pt>> wrote: > > > > > Afaik, websql does not support blobs. > > > > > > > If stored as strings, it does. sqlite treats TEXT as an opaque buffer. > > > > Not all binary can be expressed at UTF16. Note that this is also a > limitation of LocalStorage as well. > > > > UTF16 represents the character table user agents use when displaying a > buffer of text, because nothing prevents you from doing: > > # localStorage.setItem('foobar', "\0\xff\ufeff"); > # alert(escape(localStorage.getItem('foobar'))); > > Works in Opera at least, including in web sql dbs. > Works in Chrome as well. (Didn't try WebSQLDatabase.) Nevertheless, I would expect any code doing stuff like this to be fairly fragile. And in general, I'd probably recommend not doing it unless you really need to. J