Skip to content

Commit c2eb942

Browse files
committed
auto commit
1 parent 37109f3 commit c2eb942

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

notes/HTTP.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ Path 标识指定了主机下的哪些路径可以接受 Cookie(该 URL 路径
378378

379379
### 5. JavaScript
380380

381-
通过 `Document.cookie` 属性可创建新的 Cookie,也可通过该属性访问非 HttpOnly 标记的 Cookie。
381+
通过 `document.cookie` 属性可创建新的 Cookie,也可通过该属性访问非 HttpOnly 标记的 Cookie。
382382

383383
```html
384384
document.cookie = "yummy_cookie=choco";
@@ -388,7 +388,7 @@ console.log(document.cookie);
388388

389389
### 6. HttpOnly
390390

391-
标记为 HttpOnly 的 Cookie 不能被 JavaScript 脚本调用。跨站脚本攻击 (XSS) 常常使用 JavaScript 的 `Document.cookie` API 窃取用户的 Cookie 信息,因此使用 HttpOnly 标记可以在一定程度上避免 XSS 攻击。
391+
标记为 HttpOnly 的 Cookie 不能被 JavaScript 脚本调用。跨站脚本攻击 (XSS) 常常使用 JavaScript 的 `document.cookie` API 窃取用户的 Cookie 信息,因此使用 HttpOnly 标记可以在一定程度上避免 XSS 攻击。
392392

393393
```html
394394
Set-Cookie: id=a3fWa; Expires=Wed, 21 Oct 2015 07:28:00 GMT; Secure; HttpOnly
@@ -520,7 +520,7 @@ If-Modified-Since: Wed, 21 Oct 2015 07:28:00 GMT
520520

521521
**1.1 服务端驱动型**
522522

523-
客户端设置特定的 HTTP 首部字段,例如 Accept、Accept-Charset、Accept-Encoding、Accept-Language、Content-Languag,服务器根据这些字段返回特定的资源。
523+
客户端设置特定的 HTTP 首部字段,例如 Accept、Accept-Charset、Accept-Encoding、Accept-Language,服务器根据这些字段返回特定的资源。
524524

525525
它存在以下问题:
526526

0 commit comments

Comments
 (0)