I have a requirement where I want to save a message for a particular userid, if the session he was working on automatically logged off. So that next time when he logs in, the message will pop up saying his previous work was saved in drafts.
I tried using localStorage, but data stored in this manner is not available in other desktops plus it shows this message when I login thru some other user id also.
if (idleTime == 30) /* Auto logoff after 30 min of idle time */
localStorage.setItem(1, 'Your previous work was saved in Drafts in the Post Centre.');
When the user logs in again:
if(localStorage.getItem(1) !== null)
I want to save this message for this particular userid and when he logs in again from any desktop and want this message to be available.
Thanks in advance.