IE9 fakes 304 after receiving ETag
Asked Answered
G

1

10

I've got a problem with AJAX & Internet Explorer 9: it stops polling our server after receiving response to initial etagged GET.

It pretends to issue requests with response like "Response HTTP/1.1 304 Not Modified, Status 200 OK" (yes, two different status codes in one response) and same ETag (which should change with time) but none of them actually appears in server logs.

This problem appears only in IE, same code works just fine in Chrome & FF.

Perhaps passing {cache: false} to jQuery.ajax() could help, but I'd like to know if there is a way to solve the problem on a server side.

There may be a mistake in our ETag usage.

Thank you!

Glucoside answered 27/4, 2012 at 16:20 Comment(0)
P
6

I suppose this article will be usefull for you: http://www.dashbay.com/2011/05/internet-explorer-caches-ajax/

The problem is in AJAX caching. You should forbid it anyway for necessary request.

Palanquin answered 18/6, 2012 at 8:58 Comment(1)
Looks like "Expires: -1" header in server response is solution I looked for. Thank you!Glucoside

© 2022 - 2024 — McMap. All rights reserved.