Search code examples
javascripthtmlcookieswindows-store-appswinjs

Storing Cookies Windows Store App


As I discovered here, when I make a call to a server to ask for authentication in the form of a cookie, the cookie in the response is handled automatically by the underlying metro framework.

However, this means I don't have access to the cookie and, therefore, cannot store it when the app is suspended for later use. How are we supposed to store cookie information in the metro framework?

All help is greatly appreciated and I always accept an answer!


Solution

  • You wrote

    cannot store it when the app is suspended for later use

    I used Google Analytics in my Windows Store application, and I can say that cookies were successfully stored. You may ensure by checking the following filesystem location:

    C:\Users\XXXX\AppData\Local\Packages\XXXXXX\AC\INetCookies

    Docs at MSDN (link) also confirm that Cookies are supported method of storing user data.

    If I understand correctly your question: you do not need take any additional action to accept and store network cookies in Windows Store apps.