persist-js icon indicating copy to clipboard operation
persist-js copied to clipboard

Persist.type localStorage no longer persists across windows / tabs

Open bryanrasmussen opened this issue 8 years ago • 0 comments

I have an application where the user uses a bookmarklet to save images to their localStorage on our site - (user clicks save images - goes to our site with encoded url list of images to save) We save those images into a persist store, the type being used is localStorage. (the site needs login to see it so I won't provide a link - right now anyway this is me doing stuff on localhost)

anyway if I have an url /images/external?list=encodedlistofurls addtopersist = function(store_name){ try { var store = new Persist.Store(store_name); console.log("type = " + Persist.type); //Persist.remove('cookie'); store.set('urls', currenturl_list); store.save(); } catch (e) { console.log(e); } } addtopersist("external_img_store");

If I go to /images/external the Persist store is queried for the external_img_store, if I go to /images/external in the same tab I was just in where I loaded the image urls it works and I get all the urls back, if I open up a new window and go to /images/external if I go to my site and then navigate to /images/external I don't get the urls either.

It used to be that it worked that I could just paste in /images/external and see the images I had saved recently, or I could navigate there, but no longer (this if Firefox 46.0 right now but others have reported it in other browsers) , is anyone familiar with anything that could be changed with localStorage across that would cause this to not work anymore ?

bryanrasmussen avatar Apr 29 '16 10:04 bryanrasmussen