Converted to kramdown markdown syntax (i.e github / jekyll).
Updated content and nav links.
This commit is contained in:
@@ -3,7 +3,7 @@ layout: default
|
||||
title: handling cookies
|
||||
base_url: ../../../
|
||||
---
|
||||
Nav: [Workbook](../../workbook) | [Generating Responses](../../generating_response/generating_response)
|
||||
Nav: [Workbook](../../workbook) :: [Generating Responses](../../generating_response/generating_response)
|
||||
|
||||
# Handling Cookies
|
||||
|
||||
@@ -15,6 +15,7 @@ Nav: [Workbook](../../workbook) | [Generating Responses](../../generating_respon
|
||||
- [Examples](#examples)
|
||||
|
||||
<a name="cookie"></a>
|
||||
|
||||
## Cookie
|
||||
A [cookie](http://httpwg.github.io/specs/rfc6265.html) is a piece of data that can be stored in a browser's cache. If you visit a web site and then revisit it, the cookie data can be used to identify you as a return visitor. Cookies enable state information, such as an online shopping cart, to be remembered. A cookie can be short term, holding data for a single web session, that is, until you close the browser, or a cookie can be longer term, holding data for a week or a year.
|
||||
|
||||
@@ -36,6 +37,7 @@ Client send cookies to server
|
||||
|
||||
|
||||
<a name="properties"></a>
|
||||
|
||||
### Cookie properties
|
||||
|
||||
- Comment: describe the purpose of the cookie. Note that server doesn’t receive this information when client sends cookie in request header.
|
||||
@@ -49,6 +51,7 @@ Client send cookies to server
|
||||
- Version:
|
||||
|
||||
<a name="set_get"></a>
|
||||
|
||||
## Write and Read Cookies.
|
||||
|
||||
To send a cookie to the client we should use the [HTTP_HEADER] class, and call ```h.put_cookie``` feature or
|
||||
@@ -73,6 +76,7 @@ feature.
|
||||
|
||||
|
||||
<a name="set_cookie"></a>
|
||||
|
||||
### How to set Cookies
|
||||
Here we have the feature definitions to set cookies
|
||||
|
||||
@@ -117,6 +121,7 @@ Example of use:
|
||||
end
|
||||
```
|
||||
<a name="read_cookie"></a>
|
||||
|
||||
### How to read Cookies
|
||||
|
||||
Reading a particular cookie
|
||||
@@ -136,6 +141,7 @@ Reading all the cookies
|
||||
|
||||
|
||||
<a name="examples"></a>
|
||||
|
||||
### Example
|
||||
The following EWF service shows a basic use of cookies.
|
||||
1. It display a message to first-time visitors.
|
||||
@@ -290,4 +296,4 @@ end
|
||||
```
|
||||
|
||||
|
||||
Nav: [Workbook](../../workbook) | [Generating Responses](../../generating_response/generating_response)
|
||||
Nav: [Workbook](../../workbook) :: [Generating Responses](../../generating_response/generating_response)
|
||||
|
||||
Reference in New Issue
Block a user