mhttpd should say HTTP/1.1 and send better cache control headers

Issue #24 resolved
dd1 created an issue

I was investigating the problem with my google chrome 32 browser refusing to re-load mhttpd web pages (would always show stale contents from it's cache). Wierd, but while at it, I reviewed the situation with HTTP cache control. Some things have changed since I last looked at it.

Normally mhttpd forces page reload by sending special cache control http headers, but somehow it was not working anymore.

According to the latest information on the web, different browsers require different sets of cache control headers, which also work differently depending on the HTTP version (HTTP/1.0 or HTTP/1.1) and depending on the presence of HTTPS encryption.

Apparently there is a "golden set" of cache control headers that works for "most" browsers, we should probably use that set - which I think requires that we report HTTP/1.1 instead of the current HTTP/1.0.

K.O.

Comments (4)

  1. Stefan Ritt

    I changed that to HTTP/1.1 and used the cache control header:

    Cache-control: private, max-age=0, no-cache

    let's see if this works better for you.

  2. Log in to comment