Code Monkey home page Code Monkey logo

Comments (7)

marcuswestin avatar marcuswestin commented on August 28, 2024 1

Store.js v2.0 has been released with support for sessionStorage!

If you update to the latest version you will automatically get this functionality plus a bunch more :)

The docs explain how to create a custom build - to get one that only uses sessionStorage, you can do this:

// Example custom build usage:
var engine = require('../store-engine')
var storages = [require('store/storages/sessionStorage')
var plugins = []
var store = engine.createStore(storages, plugins)
store.set('foo', 'bar')

from store.js.

marcuswestin avatar marcuswestin commented on August 28, 2024

Hi Daniel,

There is no way to implement sessionStorage properly without underlying
browser support (which is lacking in many of the supported browsers).

I don't think this would be right for store.js - feel free to close or
continue discussion!

Cheers,
Marcus

On Wed, Sep 12, 2012 at 7:04 AM, Daniel Farrell [email protected]:

Is there any interest from anyone else in support for sessionStorage as an
alternative to localStorage?

There are times when I just want to keep the data for the browser session.
Mostly logged-in user info for a client side app.


Reply to this email directly or view it on GitHubhttps://github.com//issues/53.

from store.js.

danielfarrell avatar danielfarrell commented on August 28, 2024

Yeah, I'm spoiled here because I work on intranet apps and everyone has chrome frame installed in the company. If, at some point in the future, you wanted to make it easy to change the store name I wouldn't complain. ;-) Thanks for the reply

from store.js.

hax avatar hax commented on August 28, 2024

You could use window.name to implement sessionStorage for IE6/7 .

from store.js.

marcuswestin avatar marcuswestin commented on August 28, 2024

@hax: does window.name work across browser tabs/windows?

from store.js.

hax avatar hax commented on August 28, 2024

@marcuswestin The only polyfill of sessionStorage I've ever seen is https://code.google.com/p/sessionstorage , and it doesn't deal with tabs/wins. Maybe the author think it's not important, for example IE6, which is the most legacy browser do not support sessionStorage, is not a multi-tabs browser at all.

On the other side, if I read the spec correct, sessionStorage should be cloned for the new tabs/wins only this tab/win is opened from the original window and with the same origin. So I think it should be possible by accessing window.opener.name .

I will write some code to check my idea tomorrow.

from store.js.

marcuswestin avatar marcuswestin commented on August 28, 2024

Bump.

Want to add to this, or should we close?

Cheers

from store.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.