Get HTTP-only cookie from Windows 8 JS App

好久不见. 提交于 2019-12-20 04:16:42

问题


I am making a Javascript Windows 8 app in which the user connects to my server and logs in. Currently, I am trying to use the XmlHttpRequest Object to do so (specifically, WinJS.xhr) but when I get the output of getAllResponseHeaders(), the Set-Cookie header isn't there (because it is an Http-only cookie).

Is there any way to get http-only cookies from a JS Windows 8 app?

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


回答1:


As it turns out, Windows 8 apps are already able to get HTTP-only cookies with the XMLHttpRequest from the response's header. However, the system handles the cookies automatically in the same way iOS does. This seems very logical, since the coder should not be responsible for cookie handling, the underlying framework does that.



来源:https://stackoverflow.com/questions/11549432/get-http-only-cookie-from-windows-8-js-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!