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

Re: [chromium-html5] LocalStorage inside Worker

From: Charles Pritchard <chuck@jumis.com>
Date: Fri, 07 Jan 2011 16:35:23 -0800
Message-ID: <4D27B14B.7000304@jumis.com>
To: Jonas Sicking <jonas@sicking.cc>
CC: Glenn Maynard <glenn@zewt.org>, public-webapps WG <public-webapps@w3.org>
On 1/6/2011 3:20 PM, Jonas Sicking wrote:
> On Thu, Jan 6, 2011 at 3:06 PM, Charles Pritchard<chuck@jumis.com>  wrote:
>> Shouldn't sessionStorage be made accessible?
>>
>> I don't think localStorage should be (to web workers), but sessionStorage
>> seems
>> a reasonable request.
> Why wouldn't that have the same threading issues as I described?

There a good reason for it to have those issues in sessionStorage. 
localStorage need not.
At least when it comes to workers. They use synchronous interfaces in 
the File API, too.

Would you rather File API be used to create locks?

Keep in mind that sessionStorage is limited to 5 megs: these are 
reasonably small
areas of memory, and they're not written to that often.

On 1/6/2011 4:19 PM, Glenn Maynard wrote:
> On Thu, Jan 6, 2011 at 6:06 PM, Charles Pritchard<chuck@jumis.com>  wrote:
>> Shouldn't sessionStorage be made accessible?
>>
>> I don't think localStorage should be (to web workers), but sessionStorage
>> seems
>> a reasonable request.
> Why?  I've wanted to access localStorage from workers in the past, and
> if the details for accessing Storage objects are worked out at all,
> then exposing sessionStorage but not localStorage seems arbitrary and
> unnecessarily restrictive.
>

It's not arbitrary: the names "local" and "session" convey some meaning.
localStorage works well enough, out in the wild. sessionStorage is not 
in wide use.

I don't think it's restrictive, it just creates a wider implementation 
divide between session and local.
You can still use your main thread to loop through session storage and 
copy it into local storage.
Received on Saturday, 8 January 2011 00:35:20 GMT

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