Vous êtes sur la page 1sur 3

7/4/2017 Cookies|HttpWatch

(/)

HTTP Gallery

Jump to ...

4. HTTP Cookies
A cookie is a piece of data that is issued by a server in an HTTP response and stored for future use by the HTTP client. The client then re-supplies
the cookie value in subsequent requests to the same server. This mechanism allows the server to store user preferences and identity individual
users.

4.1 Setting Cookies


Servers supply cookies by populating the set-cookie response header with the following details:

Name Name of the cookie

Value Textual value to be held by the cookie

Expires Date/time when the cookie should be discarded by the browser.

If this eld is empty the cookie expires at the end of the current browser session. This eld can also be used to delete a cookie by
setting a date/time in the past.

Path Path below which the cookie should be supplied by the browser.

Domain Web site domain to which this cookie applies.

This will default to the current domain and attempts to set cookies on other domains are subject to the privacy controls built into the
browser.

These elds allow a server to create, modify, delete, and control which parts of a web site will receive the cookie.

4.2 Retrieving Cookies


Whenever a client is about to make an HTTP request it consults its local cookie store to see if any unexpired cookies match the path and domain
it is about to use. Any matching cookie values are submitted back to the server using the cookie header.

Example 4
The following cookies were sent to this page:

Name Value

ARRAnity be02237e162daa2711e0e7c97cf2a02b3c00f826064940d11636a406f8e8dfce

REFRESH THIS PAGE

Use this form to create, modify and delete cookies for this page:

https://www.httpwatch.com/httpgallery/cookies/ 1/3
7/4/2017 Cookies|HttpWatch

Action: Set Cookie

Expires: Session

Domain: www.httpwatch.com

Path: /httpgallery/cookies/

Cookie Name:

Cookie Value:

SUBMIT

Using HttpWatch with Example 4

To view the use of cookies on this page:

1. Open HttpWatch by right clicking on the web page and selecting HttpWatch from the context menu

2. Click on Record to start logging requests in HttpWatch

3. Use the form above to create or edit cookies for this page

4. Optional: You can add a lter to only capture access to this page by adding a 'URL contains' condition with the value "cookies/"

5. To view cookies for this page, select its entry in the HttpWatch log and go to the Cookies tab

<3. STATUS CODES (../ERRORS/) 5. CACHING> (../CACHING/)

Ready to get started?

TRY FOR FREE

(/DOWNLOAD/)
BUY NOW (/BUY/)

HttpWatch
Features (/features/httpdebugger.aspx)
Compare Editions (/editions.aspx)
New in Version 10.x (/newin10x.aspx)
Download (/download/)
Pricing (/buy/)

Our Customers
Who is using it? (/#customers)
What are they saying? (/#quotes)

Learning & Documentation


HttpWatch Blog (http://blog.httpwatch.com)
HTTP Gallery (/httpgallery/)
HttpWatch Help (http://help.httpwatch.com)
HttpWatch Automation Reference (http://apihelp.httpwatch.com)

Support
https://www.httpwatch.com/httpgallery/cookies/ 2/3
7/4/2017 Cookies|HttpWatch
Support
Technical Support (/support/)
About Us (/company/)
Contact Us (/company/)
Blog (http://blog.httpwatch.com)
Twitter (https://twitter.com/httpwatch)

Search (/search/) Terms & Conditions (/company/terms.aspx) Privacy Policy (/company/privacy_policy.aspx) Copyright (/company/copyright.aspx)

Copyright 2017 Neumetrix Limited (/)

https://www.httpwatch.com/httpgallery/cookies/ 3/3

Vous aimerez peut-être aussi