Export 0.2.1
[platform/framework/web/web-ui-fw.git] / libs / js / jquery-mobile-1.2.0 / node_modules / grunt / node_modules / connect / node_modules / fresh / Readme.md
1
2 # node-fresh
3
4   HTTP response freshness testing
5
6 ## fresh(req, res)
7
8  Check freshness of `req` and `res` headers.
9
10  When the cache is "fresh" __true__ is returned,
11  otherwise __false__ is returned to indicate that
12  the cache is now stale.
13
14 ## Example:
15
16 ```js
17 var req = { 'if-none-match': 'tobi' };
18 var res = { 'etag': 'luna' };
19 fresh(req, res);
20 // => false
21
22 var req = { 'if-none-match': 'tobi' };
23 var res = { 'etag': 'tobi' };
24 fresh(req, res);
25 // => true
26 ```
27
28 ## Installation
29
30 ```
31 $ npm install fresh
32 ```