0

I am using sessionStorage to store a value and when I open link in next tab sessionStorage automatically deleted. So can anyone tell me how to transfer sessionStorage to next tab. And I don't want use localStorage.

Boyrock75
  • 53
  • 1
  • 2
  • 5
  • `JSON.stringify(sessionStorage)` is easy, but you'll need to loop to set the values... then again, to get the values from a new window based on a link, you'll have to use a shared worked or localStorage (temporarily) to send the json... with a tiny bit of js, you could replace the link with a button and pass the json along as window.name. – dandavis Oct 17 '15 at 10:23
  • It's not deleted, the session is _bound to_ one tab. – try-catch-finally Oct 17 '15 at 10:25
  • Why don't you want to use `localStorage`? It seems to do just about exactly what you want. – Siguza Oct 17 '15 at 10:37
  • @Siguza Is there a procedure to clear localStorage after close browser ?? – Boyrock75 Oct 17 '15 at 10:39
  • @Siguza thankx bro its working – Boyrock75 Oct 17 '15 at 10:50

0 Answers0