IE does not return If-None-Match header over https

I have a problem with caching content using etags in IE over https.

Chrome and Firefox allow me to successfully cache content using a combination

If-Modified-Since 

and

If-None-Match 

The If-None-Match header is important because the same page can be viewed in two different ways, which will generate different etags.

This works very well, unless I use IE (I tried IE9 and 10) over https. In this case, it discards the if-none-match header, but not the if-modified-since header. This is a problem because it now shows the same cached content for two different viewing methods, since the changed timestamp and URL are the same.

The SSL certificate is valid, which I read can cause problems, and it works in both FF and Chrome. Is there any 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 included both the request and the response if the problem is with the server response. I changed the URL and server names.

Chrome - https (works 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 (works 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 (does not work 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 very grateful for any advice.

+4
source share

Source: https://habr.com/ru/post/1532848/


All Articles