There is an object that I want to keep even if user press ctrl+F5. So I am trying it to save in the localstorage of browser. As localstorage can save only string data so I am strngify it
localStorage["objSocket"] = JSON.stringyfy(socket);
but this is showing
TypeError: Converting circular structure to JSON.
I tried even
$cookies.putObject("objSocket",socket);
this too is showing the same error.
Is there any other way to save the object even if user press ctrl+f5 ?