Page MenuHomePhabricator

CentralNotice: Use only one cookie library
Open, Needs TriagePublic2 Estimated Story Points

Description

Currently we have as dependencies both jquery.cookie and mediawiki.cookie. Move to mediawiki.cookie.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 22 2016, 11:31 PM

Note that mediawiki.cookie uses jquery.cookie underneath. So this won't reduce JS payload.

Basically, if you need to set cookies in ways that is specific to one logical wiki (e.g. cookie name is prefixed, so that it works correctly if multiple wikis are hosted on the same domain), and that honours the PHP settings for cookie expiration etc., then use mw.cookie.

If you need to set generic cookies unrelated to a specific wiki context, then you'd want to use $.cookie directly.