0
rated 0 times
[
2]
[
2]
/ answers: 1 / hits: 18272
/ 7 Years ago, mon, april 3, 2017, 12:00:00
I am using sessionStorage
to ensure an action only happens once per session. However, if a user opens a new window - the sessionStorage
is not carried over to the new window, and the action is executed again. See my code below:
if sessionStorage.alreadyTracked != 1
sessionStorage.alreadyTracked = 1
...
Is there an easy way to do this that applies to all tabs? Maybe I need to use a cookie?
More From » session-variables