How to differ sessions in browser-tabs?

后端 未结 21 1629
情深已故
情深已故 2020-11-22 08:48

In a web-application implemented in java using JSP and Servlets; if I store information in the user session, this information is shared from all the tabs from the same brows

21条回答
  •  萌比男神i
    2020-11-22 09:10

    Storing the timeStamp in window.sessionStorage if it is not already set. This will give a unique value for each tab(even if the URLs are same)

    http://www.javascriptkit.com/javatutors/domstorage.shtml

    https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage

    Hope this helps.

提交回复
热议问题