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 17:21:07 GMT
So we don't have a FAQ yet. Is it time to start it? 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.
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.

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
to store data locally.

On Wed, Apr 22, 2015 at 9:44 AM, Josh Soref <> wrote:
> Andrey:
> It makes sense for someone to write a simple document saying that cookies are
> supported for subresources requested from remote web servers, but that Cordova
> doesn't promise cookie support for the app itself, and it should suggest using
> localStorage or the file API for preferences.
> Thanks for volunteering to work on this :)
>> -----Original Message-----
>> From: [] On Behalf Of
>> Andrew Grieve
>> Sent: Wednesday, April 22, 2015 11:18 AM
>> To: dev
>> Subject: Re: Cookie support in docs.
>> Cookies work the same as they do in a browser AFAIK. cookies for file:
>> don't make sense because you talk to a server at file:. If you make an XHR
>> to http:///, they it can set cookies.
>> On Wed, Apr 22, 2015 at 6:12 AM, Andrey Kurdumov
>> <>
>> wrote:
>> > Hi,
>> >
>> > I come across the following SO question.
>> >
>> >
>> cordova-official-documentation
>> >
>> > The guy could not find any mentions about cookie support in the
>> Phonegap. I
>> > do google search and find that the only mention about cookie support is
>> > issue CB-8026 where stated that Android support third-party cookies. I
>> > personally was having problems with that, but resolve it using custom HTTP
>> > header.
>> >
>> > Question is: Does it make sense add the section in the docs regarding
>> > cookies, and their limitations in Cordova apps, due to fact that files
>> > server over file:/// protocol?
>> >

Raymond Camden, Developer Advocate for MobileFirst at IBM

Email :
Blog :
Twitter: raymondcamden

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

View raw message