5

What browser (versions) support globalStorage? This is a deprecated JavaScript client-side browser storage API.

I see http://caniuse.com/namevalue-storage , but it does not explicitly mention globalStorage.

Matthew Flaschen
  • 278,309
  • 50
  • 514
  • 539
  • Do you have any issue with localStorage ? – Anirudha Gupta May 17 '14 at 01:30
  • 1
    @GuptaAnirudha not really. However, I know globalStorage came first, and there are browsers that support globalStorage but not localStorage (e.g. Firefox before 3.5, I believe, per https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage). – Matthew Flaschen May 17 '14 at 01:32
  • 1
    I don’t really understand why you are interested in this. `globalStorage` is a deprecated feature which doesn’t exist in any current browser. – poke May 17 '14 at 01:36
  • see http://stackoverflow.com/questions/9835974/use-of-globalstorage-is-deprecated-please-use-localstorage-instead – Anirudha Gupta May 17 '14 at 01:38
  • 1
    @poke, I'm mainly interested in older browsers that support globalStorage, but not localStorage. However, I am specifically asking which support globalStorage. – Matthew Flaschen May 18 '14 at 01:10
  • 1
    This was marked as a duplicate of a different question. That was a code question by a person using `globalStorage` (apparently through a library) without being aware of `localStorage`. That is not my issue. I am fully aware of `localStorage`, but want to know the browser support of `globalStorage` due to backwards compatibility considerations. This does not fit any of the duplicate types given at http://blog.stackoverflow.com/2009/04/handling-duplicate-questions/ . – Matthew Flaschen May 18 '14 at 01:16

1 Answers1

2

Here's what the Mozilla Developer Network has to say about GlobalStorage:

Non-standard

This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.

Obsolete since Gecko 13.0 (Firefox 13.0 / Thunderbird 13.0 / SeaMonkey 2.10)

This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.

As stated by people with much more authority on the subject than myself: It would be highly inadvisable to try to code to the old GlobalStorage spec, since it doesn't exist in any codified form anymore. GlobalStorage support has already been removed from Mozila software as of 2011. If you need to provide support for storage in extremely old browser versions which don't support LocalStorage/SessionStorage, you'd be much better off seeking a polyfill (such as sessionstorage) to provide support for those systems which actually currently exist as standards.

Community
  • 1
  • 1
Sam Hanley
  • 4,707
  • 7
  • 35
  • 63
  • I am asking that question because we are developing such a polyfill (specifically, one of our developers has a library for this), and one of the questions is which browsers globalStorage supports. I have no intention of only supporting globalStorage. This does not explain which browsers support it (actually, it doesn't even say which versions of Firefox support it), so it does not fully answer the question. – Matthew Flaschen May 18 '14 at 01:19
  • 1
    But why does it matter what browsers support GlobalStorage? As far as I can tell there's nobody who's maintained historical documentation on support for it because the spec doesn't exist anymore. Sure, your polyfill could fall back to GlobalStorage on those few browsers that supported it and not LocalStorage, but you'll still need to implement your own system for browsers which don't support either, so why bother with a dead system which was only briefly relevant in browser history? – Sam Hanley May 18 '14 at 18:25
  • 1
    I want to emphasize that I'm not trying to be a smartass and just tell you "it's deprecated, who cares", but I just don't think that the info is out there because it's been dead so long and wasn't a fully accepted standard to begin with. Short of manually testing a bunch of old browsers, I don't know that there's a better answer out there. – Sam Hanley May 18 '14 at 18:30
  • "you'll still need to implement your own system for browsers which don't support either, so why bother with a dead system which was only briefly relevant in browser history" Yes, other fallbacks are possible, e.g. cookies (suboptimal since it uses bandwidth, but appropriate for important data where it absolutely must be persistent, and that's really the only option) or in-memory (i.e. just variables/while the page is open, not persistent at all, just so the API works). globalStorage is better then either of those (cookies/in-memory). – Matthew Flaschen May 19 '14 at 03:08
  • Part of why I'm asking this question is to better inform people writing such libraries. It may not be answered immediately, but I think it's an appropriate question. – Matthew Flaschen May 19 '14 at 03:12
  • 2
    Okay, but in the interest of warning people writing such libraries, it's worth mentioning that the reason GlobalStorage was killed off was in large part due to the fact that although data was read-protected, any site could write over any other site's globalstorage data. It's a bad system, and I personally wouldn't even consider using a polyfill which relied on it for older browsers. – Sam Hanley May 19 '14 at 12:57