cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raymond Camden <>
Subject Re: Cookie support in docs.
Date Wed, 22 Apr 2015 20:26:50 GMT
Do we need to say the domain/cookie thing when that is standard cookie
behavior? I think most folks know a cookie set by won't be
usable via (Then again, repeating such things wouldn't hurt.)

On Wed, Apr 22, 2015 at 10:47 AM, Josh Soref <> wrote:
> Raymond wrote:
>> So we don't have a FAQ yet.
>> Is it time to start it?
> It's long overdue.
>> Here is my stab:
>> Do cookies work in Cordova apps?
>> There are two ways in which you may want to use cookies. The first is
>> within XHR (Ajax) requests to remote resources.
>> Unless you
>> specifically remove them, your Ajax library will automatically use
>> cookies in subsequent calls to remote APIs and resources you request.
> Some handwaiving necessary to indicate that a cookie set for one domain won't
> be given to an unrelated domain -- yada yada.
>> So given that some API returns a cookie required for future calls, you
>> can assume it will be automatically sent when your app hits it again.
> This overlooks normal cookies that you grow via the server setting them, or
> via a sub-resource using document.cookie.
>> The other way your app may desire to use cookies is locally - ie
>> within the app itself. This does not make sense within a Cordova app
>> as it isn't running on a proper web server itself. If your intent is
>> simply to store data for the app then you should make use the various
>> existing methods (link to
>> l#Storage)
>> to store data locally.
> Pretty good.
> Note that /some/ platforms may have cookie support by accident if they in fact
> are hosted (or temporarily hosted) on a web server. I'm not sure if we want to
> say "you should not expect your app to be able to persist cookies for its own
> use, because generally speaking Cordova applications aren't backed by a web
> server and thus have no place to store cookies" or something like that.

Raymond Camden, Developer Advocate for MobileFirst at IBM

Email :
Blog :
Twitter: raymondcamden

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message