Reputation: 4617
I just accessed to https://developer.mozilla.org/en-US/demos/detail/the-planetarium/launch
Then I clicked on button "Like It" in the top bar. It showed "You Like". Then I cleared my Chrome's user data. But I still can see the button shows "You Like".
If I open this page on another browser, it shows "Like It".
So where does Mozilla Developer Network's Demo Studio save user's data? How can users delete their data? I think it's almost impossible for users to delete these data.
Upvotes: 0
Views: 97
Reputation: 57651
You are overthinking this - the data isn't stored in the browser at all. It seems that the server remembers your choice using the combination of your IP address and user agent string. If I fire up a different browser I don't see my choice remembered. As soon as I manipulate the user agent string to be identical to the first browser I see "You Like" there. In other words, to "delete" your data you merely need to update your browser to a newer version (using some extension manipulating the user agent string will have the same effect) or reconnect to the Internet to get a new IP address.
Update: The source code of this app is apparently in Mozila's kuma repository. The "like counter" is an ActionCounterField
and the code managing uniqueness is ActionCounterUniqueManager
. If you check the get_unique
implementation you will see that it indeed uses the IP address and user agent to build a "user identifier" for non-authenticated users. The fact that changing the IP address seems to have no effect is probably a bug (might be related to Mozilla's reverse proxy responsible for caching).
Update2: Confirmed that this is a bug. I started Chrome and immediately saw that I like this demo - apparently the code currently sees the same IP address for everybody. Filed bug 766492 on that.
Upvotes: 2