When user logs out of Wikipedia and in again, all data that was saved in browser locally through jquery.jStorage module is gone. Try the example code below. It saves Date() values at the page loading time and displays all saved values. The values are incrementally added until you log out and in again.
mw.loader.load( 'jquery.jStorage' ); $(document).ready(function(){ var value = new Date(); var key = value.getTime(); $.jStorage.set( key, value.toString() ); var jSindex = $.jStorage.index(); var i; var txt = "You have loaded the script at following times:\n\n"; for (i = 0; i < jSindex.length; i++) { txt += (i + 1) + ". " + $.jStorage.get(jSindex[i]) + ",\n"; } alert (txt); });
This is a problem because logout happens to all users from time to time. It means that all the data saved locally through, for example, a userscript, will be lost eventually.
Tested the code on https://test2.wikipedia.org with the same result. I run the script loaded from localhost with
mw.loader.load('https://localhost/wikipediatest.js', 'text/javascript');