[10:16:58] does anyone know how mw.storage works? I'm wondering how it differs from using `localStorage.getItem()`/`localStorage.setItem()` directly, but the links on https://www.mediawiki.org/wiki/ResourceLoader/Core_modules#mediawiki.storage are broken [10:18:28] nice... [10:19:13] https://doc.wikimedia.org/mediawiki-core/master/js/module-mediawiki.storage-SafeStorage.html [10:20:51] aha, thanks :) [10:21:21] mediawiki.storage~SafeStorage [10:21:23] ffs [10:21:26] https://gerrit.wikimedia.org/g/mediawiki/core/%2B/HEAD/resources/src/mediawiki.storage/SafeStorage.js [10:22:07] Fixed both links [10:30:18] would it be possible to make the old links redirect to the new ones? With the amount of works volunteers do to prevent linkrot on Wikimedia projects (think IABot), it's a bit bad for us to be the _source_ of linkrot too [10:48:52] On the git link, it was a file rename at some point (I didn’t look up when) [11:50:25] 1) Avoids crashing your code because localStorage can be disabled, full, or otherwise deny reads or writes with an exception. [11:50:27] 2) Avoids your script filling up the limited 5M per domain storage by offering an expiry feature which you should make use of unless you are confident that you have a way the data (if it's a user script or gadget, there is never a way, once I disable the gadget, the data stays, so always use expiry). Local storage does not support expiry. [11:50:28] 3) A place to document, talk about, and automatically fix issues like the above. [11:50:30] 4) Ease of unit testing. (re @Nikki: does anyone know how mw.storage works? I'm wondering how it differs from using localStorage.getItem()/localStorage.setItem() dir...) [11:53:20] Public docs at https://doc.wikimedia.org/mediawiki-core/master/js/module-mediawiki.storage.html (SafeStorage is internal)