The key used for the localStorage test is "x", and the test removes it from localStorage.
If a site or application already uses this key (which is not that unlikely, e.g. if a not very clever script uses "x" and "y" without any prefix to store some coordinates), the site/app's data will be deleted.
I suggest using var test = "featurejs-test"; or something shorter but less likely to create conflicts.
One short option is to use var test = Date().
The key used for the localStorage test is
"x"
, and the test removes it from localStorage.If a site or application already uses this key (which is not that unlikely, e.g. if a not very clever script uses
"x"
and"y"
without any prefix to store some coordinates), the site/app's data will be deleted.I suggest using
var test = "featurejs-test";
or something shorter but less likely to create conflicts. One short option is to usevar test = Date()
.