Purpose
This method describes the process used to download a resource located in the server, and the cache policy to implement the Jacada Interaction Server client.
URI Syntax and Example
http://[host:port]/...[resourceName]
http://api.Interact.jacada.com/.../image.png
HTTP Method
GET
The HTTP Resource Caching request header fields are as follows:
Field Name
|
Data Type
|
Description
|
If-Modified-Since
|
string
|
This header is not mandatory. Only sent if the resource is already cached. The field value is the same as the Last-Modified value, as sent in the last server response.
|
If-None-Match
|
string
|
This header is not mandatory. Only sent if the resource is already cached. The field value is the same as the Etag value, as sent in the last server response.
|
|
An HTTP Resource Caching request example is as follows:
GET /images/fa_logo_picture.png HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
User-Agent: lblblba
If-Modified-Since: Tue, 25 Jan 2011 23:57:26 GMT
If-None-Match: "40dfdb9debbccb1:0"
Host: www.picture.co.il
Connection: Keep-Alive
|
|
Response
HTTP OK 200/ HTTP 304
The HTTP Resource Caching response header fields are as follows:
Field Name
|
Data Type
|
Description
|
Last-Modified
|
string
|
Resource Timestamp in the server storage.
|
Etag
|
string
|
Used to apply a version to the same file.
|
Cache-Control
|
string
|
Triggers the control policy in the client as follows:
•max-age=600—after the time period, the client deletes the local cached resources. •min-age=10—during this time period, the client does not request resources from server, but uses only the cached resources. |
|
Authentication Request response examples are as follows:
Response if the image is not modified:
HTTP/1.1 304 Not Modified
Last-Modified: Tue, 25 Jan 2011 23:57:26 GMT
Accept-Ranges: bytes
ETag: "40dfdb9debbccb1:0"
Date: Tue, 19 Jun 2012 08:50:00 GMT
|
Response if the image is modified:
HTTP/1.1 200 OK
Date: Tue, 19 Jun 2012 00:54:30 GMT
Content-Type: image/png
Content-Length: 33669
Last-Modified: Tue, 25 Jan 2011 23:57:26 GMT // will help to determine a change in file
ETag: "40dfdb9debbccb1:0" // enable file versioning
Cache-Control: public, max-age=600 // max time in minutes to save the cache
|
|