I have a problem with caching content using etags on IE over https.
Chrome and Firefox allow me to successfully cache content using a combination of
If-Modified-Since
and
If-None-Match
The If-None-Match header is important because the same page may be viewed in two different ways, which will generate different etags.
This works really well, except when I use IE (I have tried IE9 and 10) over https. In that case it drops the if-none-match header, but not the if-modified-since header. This is a problem because now it shows the same cached content for the two different ways of viewing, as the modified timestamp and the url both match.
The SSL certificate is valid, which I have read can cause problems, and it works in both FF and Chrome. Is there a way to fix this?
Here are my headers in Chrome, IE (http) and IE (https).
Note that the If-None-Match header is missing in IE (https).
I have included both request and response in case the problem is with the server response.
I have changed the url and server names.
Chrome - https (working as expected)
GET /events/1618 HTTP/1.1
Host: test.co.uk
Connection: keep-alive
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.152 Safari/537.36
Referer: http://test.co.uk/events/1618
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Cookie: auth_token=2397dd7dc6ce88ab66fc8efc4150f60232f977f3; _auction_session=BAh7CUkiD3Nlc3Npb25faWQGOgZFVEkiJTY4ZjdiMTQxYmEzMjJiZjUwNjc1MmQ2M2FjZTM5MDI wBjsAVEkiEF9jc3JmX3Rva2VuBjsARkkiMTlkS3JKLzRLbE5Sd1V1Q2QxUkFlUWI0bjhwMFo1RlRqMDkwMDR4SnNESUE9BjsARkkiDHVzZXJfaWQGOwBGaQJgBUkiD2luX3NhbmRwaXQGOwBGSSIJdHJ1ZQY7AFQ%3D--c54fabd39a2678f2cdee6f76d9812dda331dbf61; locale=en-uk
If-None-Match: "327fd750ae149bd0589dc13bea9c48f2"
If-Modified-Since: Fri, 21 Mar 2014 08:35:50 GMT
HTTP/1.1 304 Not Modified
Date: Fri, 21 Mar 2014 14:05:03 GMT
Server: Apache/2.2.3 (CentOS)
Connection: close
ETag: "ba4788d17893e6ff2593af9e360db7cc"
Cache-Control: must-revalidate, private, max-age=0
Set-Cookie: locale=en-uk; path=/; expires=Sat, 21-Mar-2015 14:05:03 GMT
IE - http (working as expected)
Request GET /events/1618 HTTP/1.1
Accept text/html, application/xhtml+xml, */*
Referer http://test.co.uk/events/1618
Accept-Language en-GB
User-Agent Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)
Accept-Encoding gzip, deflate
Host test.co.uk
If-Modified-Since Fri, 21 Mar 2014 08:35:50 GMT
If-None-Match "327fd750ae149bd0589dc13bea9c48f2"
DNT 1
Connection Keep-Alive
Cookie locale=en-uk; auth_token=2397dd7dc6ce88ab66fc8efc4150f60232f977f3; _auction_session=BAh7CkkiD3Nlc3Npb25faWQGOgZFVEkiJTIxMzRhMTQwYzZhNjU4ZTE2NGY5Y2Y4ZGNjZjVhN2I 3BjsAVEkiEF9jc3JmX3Rva2VuBjsARkkiMXFReklPK3oxNEZSUUEwa3AyeFZLY3REVkJCMDI4U3UwVnlYNlJnSFZGakE9BjsARkkiDHVzZXJfaWQGOwBGaQJgBUkiD2luX3NhbmRwaXQGOwBGSSIJdHJ1ZQY7AFRJIhdpbl9zYW5kcGl0X2FzX3VzZXIGOwBGSSIJMTM0MQY7AFQ%3D--91e307c63096e1cc96f265d457480707021b25dc
Response HTTP/1.1 304 Not Modified
ETag "327fd750ae149bd0589dc13bea9c48f2"
X-Request-Id 16ab60d75b2bedcad96a182423771e63
X-Runtime 0.983268
X-Rack-Cache miss
X-Powered-By Phusion Passenger 4.0.37
Content-Length 21788
Status 200 OK
Content-Type text/html; charset=utf-8
Expires Fri, 21 Mar 2014 13:06:23 GMT
Last-Modified Fri, 21 Mar 2014 08:35:50 GMT
IE - https (not working as expected)
Request GET /events/1618 HTTP/1.1
Accept text/html, application/xhtml+xml, */*
Accept-Language en-GB
User-Agent Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)
Accept-Encoding gzip, deflate
Host test.co.uk
If-Modified-Since Fri, 21 Mar 2014 08:35:50 GMT; length=26501
DNT 1
Connection Keep-Alive
Cookie locale=en-uk; auth_token=2397dd7dc6ce88ab66fc8efc4150f60232f977f3; _auction_session=BAh7CkkiD3Nlc3Npb25faWQGOgZFVEkiJTIxMzRhMTQwYzZhNjU4ZTE2NGY5Y2Y4ZGNjZjVhN2I3BjsAVEkiEF9jc3JmX3Rva2VuBjsARkkiMXFReklPK3oxNEZSUUEwa3AyeFZLY3REVkJCMDI4U3UwVnlYNlJnSFZGakE9BjsARkkiDHVzZXJfaWQGOwBGaQJgBUkiD2luX3NhbmRwaXQGOwBGSSIJdHJ1ZQY7AFRJIhdpbl9zYW5kcGl0X2FzX3VzZXIGOwBGSSIJMTM0MQY7AFQ%3D--91e307c63096e1cc96f265d457480707021b25dc
Response HTTP/1.1 304 Not Modified
ETag "327fd750ae149bd0589dc13bea9c48f2"
X-Request-Id 25aab65eb6028c521622e86d8d716226
X-Runtime 0.406167
X-Rack-Cache miss
X-Powered-By Phusion Passenger 4.0.37
Content-Length 26501
Status 200 OK
Content-Type text/html; charset=utf-8
Expires Fri, 21 Mar 2014 13:14:02 GMT
Last-Modified Fri, 21 Mar 2014 08:35:50 GMT
I would be extremely grateful for any advice.