There ARE valid use cases where we need to read/write cookies.
In my case, I am building a web interface for a heavy old-fashioned desktop website.
Considering transmitting these big HTML pages and parsing them is terrible performance-wise, I built a "mobilizer proxy" service that translates heavy HTML into light JSON with only the required data.
However, I do not want the users to login via the proxy, but I prefer them to send the username/password to the original website directly and use the SESSIONID cookie set by the website when calling the mobilizer proxy for subsequent calls (for security reasons).
So I need to login from the cordova app to the old-fashioned website and retrieve the SESSIONID cookie that I can use in the mobilizer proxy.
Unfortunately, it is not possible in Cordova apps to manage the cookies directly from the JavaScript side (although it seems to be managed in the background, just not accessible to the JavaScript side).
So I found a workaround to that: I created a Cordova plugin that logins natively (using java.net.HttpClient for example in Android) and returns the SESSIONID to the JavaScript side (as it's possible to read/write the cookies from the native side).
That's far from ideal, but the best workaround I found so far.
Thanks,
Thomas