W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2011

Re: [chromium-html5] LocalStorage inside Worker

From: Jeremy Orlow <jorlow@chromium.org>
Date: Thu, 27 Jan 2011 13:11:15 -0800
Message-ID: <AANLkTimx4CB0SnAnt1ErvduoJH+jO3ATK+Qq_fTgPgQV@mail.gmail.com>
To: Joćo Eiras <joao-c-eiras@telecom.pt>
Cc: public-webapps WG <public-webapps@w3.org>
On Thu, Jan 27, 2011 at 12:47 PM, Joćo Eiras <joao-c-eiras@telecom.pt>wrote:

> On Thursday 27 January 2011 20:39:50 you wrote:
> > On Thu, Jan 27, 2011 at 12:06 PM, Charles Pritchard <chuck@visc.us
> <mailto:chuck@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-eiras@telecom.pt
> <mailto:joao-c-eiras@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
Received on Thursday, 27 January 2011 21:12:06 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:43 GMT