1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

cookieとsession

Posted at

クッキーの役割

Cookieの仕組み

参考URL
http://qiita.com/mogulla3/items/189c99c87a0fc827520e

まず、サーバがSet-Cookieという名前のフィールドをHTTPヘッダに載せてレスポンスを返す。Cookieとしてクライアントに保存して欲しい情報を、このSet-Cookieフィールドの値として設定する。
レスポンスを受け取ったクライアントはCookieをブラウザに保存する。そして、それ以降のリクエストには受け取ったCookieをそのままリクエストするようになる。

※ Cookieを載せてリクエストするURLの範囲はSet-Cookieの属性値で指定され、その値に従う
※ Cookieには有効期限があり、有効期限が切れたCookieは消滅し、リクエストに載らない

クッキーの仕組み

参考URL
http://www.atmarkit.co.jp/ait/articles/1704/20/news024.html
http://www.atmarkit.co.jp/ait/articles/1704/20/news024_2.html

Seleniumでcookieをsetする方法
http://tech.furyu.jp/blog/?p=1473

てか、Seleniumのget_cookiesメソッドで一度クッキーを取得して二回目からその取得した値を使うほうが早いと思う。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?