Export (0) Print
Expand All

Cookies 

Demonstrates how to set cookie data in the response and get cookie data from a request.

Use a browser to view SetCookies.srf, then navigate to ShowCookies.srf. The first page sends cookies to the browser. The second page displays the cookies sent by the browser.

The SetCookies page sends the following types of cookie to the browser:

  • A single-valued session cookie

  • A single-valued cookie

  • A cookie without a value

  • A multivalued cookie

  • A single-valued persistent cookie

The ShowCookies page displays the cookies sent by the browser in three different ways:

  1. Displays the cookie data available from the CHttpRequest::m_requestCookies collection.

  2. Displays the cookie data available when CHttpRequest::GetServerVariable is called for the HTTP_COOKIE server variable.

  3. Displays the cookie data available to client script from the cookie property of the document object.

Demonstrates

Community Additions

ADD
Show:
© 2015 Microsoft