[問題] http header "ETag"的產生
http header "ETag"的計算
因為看到2種ETag
ETag: "2643bb-4205f-7b3bd9c0"
ETag: "2296-1155780780000"
請問
ETag的值有規定的計算邏輯嗎??
還是說只要我能給檔案一個不重複的標籤就可以了??
另外
如果想要減少網路負載又想要掌握網頁使用情形
如果做好 "ETag" & "Last-Modified" 的傳送 & 比對
而不使用 "Cache-Control: no-cache"
能否保證client每次都會連上來詢問檔案是否仍有效
--request
GET /ocean.jpg HTTP/1.1
Accept: */*
Accept-Language: zh-tw
Accept-Encoding: gzip, deflate
If-Modified-Since: Thu, 17 Aug 2006 02:13:00 GMT
If-None-Match: "2296-1155780780000"
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR
1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)
Host: 127.0.0.1
Connection: Keep-Alive
--response 1
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
ETag: "2296-1155780780000"
Last-Modified: Thu, 17 Aug 2006 02:13:00 GMT
Content-Type: image/jpeg
Content-Length: 2296
Date: Fri, 01 Aug 2008 10:22:42 GMT
--response2
HTTP/1.1 304 Not Modified
Server: Apache-Coyote/1.1
Date: Fri, 01 Aug 2008 10:20:01 GMT
--
Put your hand on a hot stove for a minute, and it seems like an
hour. Sit with a pretty girl for an hour, and it seems like a
minute. That's relativity.
-- Albert Einstein
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 59.120.17.66
※ 編輯: Hlidskijalf 來自: 59.120.17.66 (08/01 18:24)
推
08/02 08:36, , 1F
08/02 08:36, 1F
推
08/02 08:42, , 2F
08/02 08:42, 2F