从Windows 8 JS应用程序获取HTTP-only cookie [英] Get HTTP-only cookie from Windows 8 JS App

查看:249
本文介绍了从Windows 8 JS应用程序获取HTTP-only cookie的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在做一个Javascript Windows 8应用程序,其中用户连接到我的服务器并登录。目前,我想使用XmlHttpRequest对象这样做(具体来说,WinJS.xhr),但当我得到的输出getAllResponseHeaders(),Set-Cookie头不存在(因为它是一个仅限Http的cookie)。

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).

有任何方法来获取http-only一个JS Windows 8应用程序?

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!

推荐答案

事实证明,Windows 8应用程序已经能够从响应的头部获取XMLHttpRequest的HTTP-only cookies。但是,系统以与iOS相同的方式自动处理Cookie。这似乎很合乎逻辑,因为编码器不应负责cookie处理,底层框架这样做。

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.

这篇关于从Windows 8 JS应用程序获取HTTP-only cookie的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆