When I hit a basic .html page with firefox, I get another hit if I use chrome. If I use IE and Opera the first hit is always a miss then if i reload I get a hit.<div><br></div><div>I'm using the following config.</div>
<div><br></div><div><div>backend default {</div><div> .host = "192.168.100.53";</div><div> .port = "80";</div><div>}</div><div><br></div><div>sub vcl_recv {</div><div># Normalize Content-Encoding</div>
<div> if (req.http.Accept-Encoding) {</div><div> if (req.url ~ "\.(jpg|png|gif|gz|tgz|bz2|lzma|tbz)(\?.*|)$") {</div><div> remove req.http.Accept-Encoding;</div><div> } elsif (req.http.Accept-Encoding ~ "gzip") {</div>
<div> set req.http.Accept-Encoding = "gzip";</div><div> } elsif (req.http.Accept-Encoding ~ "deflate") {</div><div> set req.http.Accept-Encoding = "deflate";</div>
<div> } else {</div><div> remove req.http.Accept-Encoding;</div><div> }</div><div> }</div><div># Remove cookies and query string for real static files</div><div> if (req.url ~ "^/[^?]+\.(jpeg|jpg|png|gif|ico|js|css|txt|gz|zip|lzma|bz2|tgz|tbz|html|htm)(\?.*|)$") {</div>
<div> unset req.http.cookie;</div><div> set req.url = regsub(req.url, "\?.*$", "");</div><div> }</div><div># Remove cookies from front page</div><div> if (req.url ~ "^/$") {</div>
<div> unset req.http.cookie;</div><div> }</div><div>}</div><div>sub vcl_fetch {</div><div> if (req.url ~ "^/$") {</div><div> unset obj.http.set-cookie;</div><div> }</div><div>
}</div><div> </div><div>sub vcl_deliver {</div><div> if (obj.hits > 0) {</div><div> set resp.http.X-Cache = "Varnish: HIT " obj.hits;</div><div> }</div><div> else {</div><div> set resp.http.X-Cache = "Varnish: MISS";</div>
<div> }</div><div>}</div><div> </div><div>sub vcl_error {</div><div> if (obj.status == 503 && req.restarts <= 5) {</div><div> restart;</div><div> }</div><div>}</div><div><br></div><div><br></div><div><br>
</div><div><br></div><div><br></div><div><br></div><div>Here is a varinishlog for opera</div><div><br></div><div><br></div><div><br></div><div><div> 12 SessionOpen c 192.168.71.157 57733 :80</div><div> 12 ReqStart c 192.168.71.157 57733 1009797700</div>
<div> 12 RxRequest c GET</div><div> 12 RxURL c /test.html</div><div> 12 RxProtocol c HTTP/1.1</div><div> 12 RxHeader c User-Agent: Opera/9.80 (X11; Linux i686; U; en) Presto/2.2.15 Version/10.10</div>
<div> 12 RxHeader c Host: www.theopenskyproject.stg</div><div> 12 RxHeader c Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1</div><div>
12 RxHeader c Accept-Language: en-US,en;q=0.9</div><div> 12 RxHeader c Accept-Charset: iso-8859-1, utf-8, utf-16, *;q=0.1</div><div> 12 RxHeader c Accept-Encoding: deflate, gzip, x-gzip, identity, *;q=0</div>
<div> 12 RxHeader c Cache-Control: no-cache</div><div> 12 RxHeader c Connection: Keep-Alive, TE</div><div> 12 RxHeader c TE: deflate, gzip, chunked, identity, trailers</div><div> 12 VCL_call c recv</div>
<div> 12 VCL_return c lookup</div><div> 12 VCL_call c hash</div><div> 12 VCL_return c hash</div><div> 12 VCL_call c miss</div><div> 12 VCL_return c fetch</div><div> 13 BackendOpen b default 192.168.100.54 46963 192.168.100.53 80</div>
<div> 12 Backend c 13 default default</div><div> 13 TxRequest b GET</div><div> 13 TxURL b /test.html</div><div> 13 TxProtocol b HTTP/1.1</div><div> 13 TxHeader b User-Agent: Opera/9.80 (X11; Linux i686; U; en) Presto/2.2.15 Version/10.10</div>
<div> 13 TxHeader b Host: www.theopenskyproject.stg</div><div> 13 TxHeader b Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1</div><div>
13 TxHeader b Accept-Language: en-US,en;q=0.9</div><div> 13 TxHeader b Accept-Charset: iso-8859-1, utf-8, utf-16, *;q=0.1</div><div> 13 TxHeader b Accept-Encoding: gzip</div><div> 13 TxHeader b X-Varnish: 1009797700</div>
<div> 13 TxHeader b X-Forwarded-For: 192.168.71.157</div><div> 13 RxProtocol b HTTP/1.1</div><div> 13 RxStatus b 200</div><div> 13 RxResponse b OK</div><div> 13 RxHeader b Date: Thu, 18 Mar 2010 16:23:34 GMT</div>
<div> 13 RxHeader b Server: Apache</div><div> 13 RxHeader b Accept-Ranges: bytes</div><div> 13 RxHeader b Cache-Control: max-age=7200</div><div> 13 RxHeader b Expires: Thu, 18 Mar 2010 18:23:34 GMT</div>
<div> 13 RxHeader b Content-Length: 14</div><div> 13 RxHeader b Connection: close</div><div> 13 RxHeader b Content-Type: text/html; charset=UTF-8</div><div> 12 ObjProtocol c HTTP/1.1</div><div> 12 ObjStatus c 200</div>
<div> 12 ObjResponse c OK</div><div> 12 ObjHeader c Date: Thu, 18 Mar 2010 16:23:34 GMT</div><div> 12 ObjHeader c Server: Apache</div><div> 12 ObjHeader c Cache-Control: max-age=7200</div><div> 12 ObjHeader c Expires: Thu, 18 Mar 2010 18:23:34 GMT</div>
<div> 12 ObjHeader c Content-Type: text/html; charset=UTF-8</div><div> 13 BackendClose b default</div><div> 12 TTL c 1009797700 RFC 7200 1268929414 0 0 7200 0</div><div> 12 VCL_call c fetch</div><div>
12 VCL_return c deliver</div><div> 12 Length c 14</div><div> 12 VCL_call c deliver</div><div> 12 VCL_return c deliver</div><div> 12 TxProtocol c HTTP/1.1</div><div> 12 TxStatus c 200</div>
<div><div> 12 TxResponse c OK</div><div> 12 TxHeader c Server: Apache</div><div> 12 TxHeader c Cache-Control: max-age=7200</div><div> 12 TxHeader c Expires: Thu, 18 Mar 2010 18:23:34 GMT</div><div> 12 TxHeader c Content-Type: text/html; charset=UTF-8</div>
<div> 12 TxHeader c Content-Length: 14</div><div> 12 TxHeader c Date: Thu, 18 Mar 2010 16:23:34 GMT</div><div> 12 TxHeader c X-Varnish: 1009797700</div><div> 12 TxHeader c Age: 0</div><div> 12 TxHeader c Via: 1.1 varnish</div>
<div> 12 TxHeader c Connection: keep-alive</div><div> 12 TxHeader c X-Cache: Varnish: MISS</div><div> 12 ReqEnd c 1009797700 1268929414.785295010 1268929414.787596941 0.000219107 0.002166986 0.000134945</div>
<div> 12 ReqStart c 192.168.71.157 57733 1009797701</div><div><br></div><div><br></div><div><br></div><div><br></div><div>Here is a log from chrome</div><div><br></div><div><br></div><div><br></div><div><div> 12 SessionOpen c 192.168.71.157 57742 :80</div>
<div> 12 ReqStart c 192.168.71.157 57742 1009797702</div><div> 12 RxRequest c GET</div><div> 12 RxURL c /test.html</div><div> 12 RxProtocol c HTTP/1.1</div><div> 12 RxHeader c Host: www.theopenskyproject.stg</div>
<div> 12 RxHeader c Connection: keep-alive</div><div> 12 RxHeader c User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/532.9 (KHTML, like Gecko) Chrome/5.0.307.11 Safari/532.9</div><div> 12 RxHeader c Cache-Control: max-age=0</div>
<div> 12 RxHeader c Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5</div><div> 12 RxHeader c Accept-Encoding: gzip,deflate,sdch</div><div> 12 RxHeader c Cookie: __utmz=193312050.1268919813.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); frontend=tmj6eo0u987s093h00gdd5t287; __utma=193312050.1928613275.1268919813.1268919813.1268919813.1; __utmc=193312050</div>
<div> 12 RxHeader c Accept-Language: en-US,en;q=0.8</div><div> 12 RxHeader c Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3</div><div> 12 VCL_call c recv</div><div> 12 VCL_return c lookup</div><div> 12 VCL_call c hash</div>
<div> 12 VCL_return c hash</div><div> 12 Hit c 1009797700</div><div> 12 VCL_call c hit</div><div> 12 VCL_return c deliver</div><div> 12 Length c 14</div><div> 12 VCL_call c deliver</div>
<div> 12 VCL_return c deliver</div><div> 12 TxProtocol c HTTP/1.1</div><div> 12 TxStatus c 200</div><div> 12 TxResponse c OK</div><div> 12 TxHeader c Server: Apache</div><div> 12 TxHeader c Cache-Control: max-age=7200</div>
<div> 12 TxHeader c Expires: Thu, 18 Mar 2010 18:23:34 GMT</div><div> 12 TxHeader c Content-Type: text/html; charset=UTF-8</div><div> 12 TxHeader c Content-Length: 14</div><div> 12 TxHeader c Date: Thu, 18 Mar 2010 16:25:01 GMT</div>
<div> 12 TxHeader c X-Varnish: 1009797702 1009797700</div><div> 12 TxHeader c Age: 87</div><div> 12 TxHeader c Via: 1.1 varnish</div><div> 12 TxHeader c Connection: keep-alive</div><div> 12 TxHeader c X-Cache: Varnish: HIT 1</div>
<div> 12 ReqEnd c 1009797702 1268929501.792177916 1268929501.792538881 0.000161886 0.000236988 0.000123978</div><div> 12 Debug c "herding"</div><div> 0 CLI - Rd ping</div><div> 0 CLI - Wr 0 200 PONG 1268929502 1.0</div>
<div><br></div></div></div></div></div>