caching - HTTP Expires header not respected by browser? -


I have a situation where sending my (embedded) web server timed out of the header, but the browser Header does not respect settings, that is, if I refresh the page, then the browser requests the resources that are to be cached. The following are the handlers which are being changed:

 https://192.168.1.180/scgi-bin/ajax/ajax.cgi /scgi-bin/ajax/ajax.cgi HTTP / 1.1 host: 192.168. 1.180 User-Agent: Mozilla / 5.0 (Windows; U; Windows NT 6.0; N-US; RV .: 1.9.0.11) Geeko / 200 9 60215 Firefox / 3.0.11 (Net CLR 3.5.30729) Accept: Text / html, application / xhtml + xml, app / xml; Q = 0.9, * / *; Q = 0.8 Accept Language: N-U, N; Q = 0.5 encoding-encoding: gizip, display act-carset: ISO-8859-1, UTF-8; Q = 0.7, *; Q = 0.7 Keep-alive: 300 Connections: Keep-alive cash-control: Maximum-age = 0 HTTP / 1.x 200 OK Date: Wed, 24 Jun 2009 20:26: 47 GMT server: Embedded HTTP server connection: Close content-type: text / html ----------------------------------------- ----------------- https://192.168.1.180/scgi-bin/ajax/static.cgi?fn=images/logo.jpg&ts=20090624201057 GET / Ski-bin / Ajax / static.cgi? Fn = images / logo.jpg & ts = 20090624201057 http / 1.1 host: 192.168.1.180 User-agent: Mozilla / 5.0 (Windows; U; Windows NT 6.0; en-US; rv: 1.9.0.11) Gecko / 2009060215 Firefox / 3.0.11 (.NET CLR 3.5.30729) Accept: Image / PNG, V / *; Q = 0.8, * / *; Q = 0.5 Accept-language: en-us, n; Q = 0.5 accept-encoding: gzip, display acceptable-charset: ISO-885 9-1, UTF-8; Q = 0.7, *; Q = 0.7 Keep-alive: 300 Connections: Keep-alive Referrer: https://192.168.1.180/ Scgi-bin / ajax / ajax.cgi Cache-Control: Max-age = 0 HTTP / 1.x 200 OK Date: Wednesday, June 24, 2009 20:26:47 GMT Server: Embedded HTTP Server Connection: Close Expired: Wed, June 1, 2011 20:00:00 GMT Content-Type: image / jpg ----------- ---------------- ------------------------------- 

ajax.cgi returns a HTML page with a logo graphic (via the Static.cgi script), which I want to cache, but the browser is asking the logo on every refresh.

If you refresh the page, then the browser ignores the underlying header, it always checks the web By contacting the server, whether the cache entry is still valid. Ideally, if this will use the modified-access request header so that the cache entry is still valid, then the server can not 'modify' 304.

You are not setting the last-modified header, so the browser must execute a non-standard GET content to ensure that it is up-to-date.

Some thumb rules for the closing and final-modified settings are described in this blog post:


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -