W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2010

Re: Local Storage Not Retaining Data Between Local Browser Sessions

From: Jonas Sicking <jonas@sicking.cc>
Date: Sun, 28 Nov 2010 22:11:47 -0800
Message-ID: <AANLkTike65jrZHxXRGL21u7Tjy5i3d_4z5zbh=7DUVZH@mail.gmail.com>
To: Ronald Lane <rlane6013@verizon.net>
Cc: public-webapps@w3.org
On Sun, Nov 28, 2010 at 11:25 AM, Ronald Lane <rlane6013@verizon.net> wrote:
> We would like to develop a system (javascript) to run on a local browser. We
> would like to make use of local storage however in testing this out we see
> that when running the app from a server local storage works fine but when
> running the app locally it fails to retain the data between sessions.
>
> Is this an intended function?

This is really a problem with the file: protocol rather than a problem
with localStorage. localStorage works on the basis of origin, a
concept which is defined for protocols like http: and https:, however
I believe so far has not been defined for file:. I'd recommend talking
with the IETF, though I wouldn't get my hopes up as it's really a very
hard problem to solve unfortunately.

The problem is that people tend to save files in all sorts of places
on their hard drive, so where do you draw the lines for which pages
share localStorage?

/ Jonas
Received on Monday, 29 November 2010 06:17:27 GMT

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