Requests for comment/Survey Cookies/Local Storage on Wikimedia
|Local Storage on Wikimedia|
|Document status||in draft
We would like to develop tools to help us inventory all cookies and local storage usage so that we can better understand their usage and document them.
Searching through all the code that sets cookies is rather impractical. Mwgrep suggests there are about 1500 user scripts which set cookies. Ideally any method will help us find existing cookies/local storage as well as future ones.
We are currently considering a solution involving a MediaWiki extension, which has a list of cookies (such as those from the Cookie statement), and compares the cookie names in the request against the list of cookie names. If there are cookies that are not on the list, it would log a message. As more cookies are discovered, this list of cookies can be expanded to filter them out.
Additionally we wish to discover the uses of LocalStorage. We can use a similar method, but on the client side, and perhaps use EventLogging to log the events.
We would like a review to see if this is the best method of surveying cookie and LocalStorage usage on Wikimedia, or if there would be another approach which would be better.