Internet Explorer does not handle etags optimally

Any opinions on the validity of this defect & solution:

http://dev.rubyonrails.org/ticket/9104

When using internet explorer, ajax get requests with etags always return the same information, which doesn’t seem ideal.

source: http://ablog.apress.com/?p=981

IE (6.0.290): Utilizes the ETag, but when an identical
request is made does not make the request and pulls the
 information from the cache.

For our site we use ajax to allow people to edit sections of a big page. To edit a description we’d use a get url like this: “page/description/100”. Unfortunately with IE it always returns the same edit state.

I searched around for a better solution and found a suggestion to append ?#{timestamp} on to the url which seems a bit messy. I attached a patch file that seemed to be the best alternative, which is to turn off etags for ie xml http requests.

Thanks, Russell

internet_explorer_etag_issue.diff (11.8 KB)

Hi Russell,

We've also had this problem, and we fixed it by putting the following into the cache-control header:

private, max-age=0, must-revalidate

I think it's that way by default in edge now? Does it not work for you?

Cheers,

Nik

Ah, great. We're currently on r7199 and it looks like that change came in r7309. We'll have to upgrade and test it out for our release next week. Thanks!

-- Russell

Hi Russell,

Cool. Let us know how it goes - there was no way to test what we wrote other than to observe it "in the wild", so independent observations would be useful :slight_smile:

Cheers,

Nik

I just reverted my changes and patched in this changeset and it works and passes all our selenium tests, so it looks like we're good to go. Thanks!

-- Russell