Wednesday, 15 February 2012

javascript - Access to local storage of active page -



javascript - Access to local storage of active page -

i need access local storage of active web-browser tab script globally loaded. possible? if yes, please provide example? p.s. code "window.localstorage[key]" gets info global storage. web-browser: safari, mac os.

thanks

there no such thing "global storage". localstorage shared across tabs have same domain open, that's it.

i'd suggest adding kind of identifier key, info current tab / window:

var currenttabid = parseint(localstorage.tabids || -1) + 1; localstorage.tabids = currenttabid; localstorage['mykey' + currenttabid] = "some data";

javascript osx safari

No comments:

Post a Comment