Get HTTP-only cookie from Windows 8 JS App(从 Windows 8 JS 应用程序获取仅 HTTP cookie)
问题描述
我正在制作一个 Javascript Windows 8 应用程序,用户在该应用程序中连接到我的服务器并登录.目前,我正在尝试使用 XmlHttpRequest 对象来执行此操作(特别是 WinJS.xhr),但是当我得到getAllResponseHeaders(),Set-Cookie 标头不存在(因为它是一个 Http-only 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).
有没有办法从 JS Windows 8 应用程序中获取仅限 http 的 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!
推荐答案
事实证明,Windows 8 应用程序已经能够通过响应标头中的 XMLHttpRequest 获取仅限 HTTP 的 cookie.但是,系统会以与 iOS 相同的方式自动处理 cookie.这看起来很合乎逻辑,因为 coder 不应该负责 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 cookie的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:从 Windows 8 JS 应用程序获取仅 HTTP cookie


基础教程推荐
- 什么是不使用 jQuery 的经验技术原因? 2022-01-01
- WatchKit 支持 html 吗?有没有像 UIWebview 这样的控制器? 2022-01-01
- Node.js 有没有好的索引/搜索引擎? 2022-01-01
- 为什么我在 Vue.js 中得到 ERR_CONNECTION_TIMED_OUT? 2022-01-01
- 如何在特定日期之前获取消息? 2022-01-01
- jQuery File Upload - 如何识别所有文件何时上传 2022-01-01
- 每次设置弹出窗口的焦点 2022-01-01
- 如何使用sencha Touch2在单页中显示列表和其他标签 2022-01-01
- Javascript 在多个元素上单击事件侦听器并获取目标 2022-01-01
- 如何使用 CSS 显示和隐藏 div? 2022-01-01