5. A GET Request
GET /index.php HTTP/1.1
Host: www.rakuya.com.tw
User-Agent:Mozilla/4.0 (...)
HTTP/1.1 200 OK
Content-Type: text/html
Content-Length: 355
<html>...
6. Last-Modified Header
HTTP/1.1 200 OK
Content-Type: text/html
Content-Length: 355
Last-Modified: Thu, 27 Nov 2008 17:27:48 GMT
<html>...
7. Last Modified – Request
• Conditional Request
由 Server 端再判斷一次是否要更新內容
GET /index.php HTTP/1.1
Host: www.rakuya.com.tw
User-Agent:Mozilla/4.0 (...)
If-Modified-Since: Thu, 27 Nov 2008 17:27:48 GMT
HTTP/1.1 304 Not Modified
Content-Type: text/html
Content-Length: 0
Last-Modified: Thu, 27 Nov 2008 17:27:48 GMT
8. Last Modified - Ctrl-F5
• 清除掉 If-Modified-Since
當成新的 request
GET /index.php HTTP/1.1
Host: www.rakuya.com.tw
User-Agent:Mozilla/4.0 (...)
If-Modified-Since: Thu, 27 Nov 2008 17:27:48 GMT
HTTP/1.1 200 OK
Content-Type: text/html
Content-Length: 355
<html>...
9. Expires Header
HTTP/1.1 200 OK
Content-Type: text/html
Content-Length: 355
Expires: Wed, 31 Dec 2008 23:59:59 GMT
<html>...