-
Notifications
You must be signed in to change notification settings - Fork 16
/
fresh.node.txt
20 lines (14 loc) · 1.76 KB
/
fresh.node.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
FRESH
ALTERNATIVES ==> # - fresh (preferred with Node)
# - deno etag (preferred with Deno)
VERSION ==> #0.5.2
#Checks HTTP conditional caching, i.e. if If-None-Match [C] against ETag [S] or
#If-Modified-Since [C] against Last-Modified [S]
FRESH(REQ_OBJ, RES_OBJ)->BOOL #Returns true:
# - if either:
# - If-None-Match [C] === ETag [S]
# - If-Modified-Since [C] <= Last-Modified [S]
# - unless Cache-Control: no-cache [C]
#REQ|RES_OBJ are headers