Bug Tracker

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#14334 closed bug (cantfix)

Issues with AJAX request and caching on Chrome

Reported by: artur.tomusiak@… Owned by: artur.tomusiak@…
Priority: undecided Milestone: None
Component: unfiled Version: 1.7.2
Keywords: Cc: mkwst
Blocked by: Blocking:

Description

It appears that there is an issue with Chrome 28+ and jQuery AJAX requests. The behavior we experience is that at random (quite rare occasions), jQuery .ajax() calls start generating exceptions as if there was some sort of connection problem and never send the AJAX request. The issue goes away when the entire page gets refreshed. A workaround to the problem is to set cache: false option in the .ajax() call.

We found posts online with other people experiencing this problem:

http://stackoverflow.com/questions/17778504/jquery-ajax-random-error-in-chrome-only

"The issue appears to be a bug with how Chrome 28 handles caching for GET requests. Version 27 works fine, as do POST requests in version 28.

You can workaround the issue by setting the 'cache' property to false in your $.ajax() call."

Please let me know if this is something that we can expect to get fixed by jQuery.

Change History (10)

comment:1 Changed 6 years ago by dmethvin

Owner: set to artur.tomusiak@…
Status: newpending

Can you post a link to the Chrome bug tracker ticket?

comment:2 in reply to:  1 Changed 6 years ago by artur.tomusiak@…

Status: pendingnew

Replying to dmethvin:

Can you post a link to the Chrome bug tracker ticket?

Unfortunately I could not fine any.

comment:3 Changed 6 years ago by timmywil

On first glance, this doesn't sound like something we should fix on jQuery's end. The workaround to set cache to false seems reasonable.

comment:4 Changed 6 years ago by artur.tomusiak@…

I would think that Chrome should fix it too. However, the idea of jQuery in general is to be able to handle different browsers and their shortcomings and to produce the same result no matter which browser is being used, just like jQuery having special different sorts of code to handle IE problems, I believe it could also have special AJAX code to handle Chrome 28+.

comment:5 Changed 6 years ago by dmethvin

Cc: mkwst added

Half the internet uses some version of jQuery, and if Chrome changed something to break them it won't help for us to issue a fix in a future version. Half the internet will take years to upgrade.

Including Mike West...have you heard of this? I couldn't find a Chrome ticket that seemed to match but it seems if the problem exists it would certainly be causing lots of issues.

comment:6 Changed 6 years ago by anonymous

One thing that makes this issue less prominent is that is happens randomly and refreshing the page fixes the problem. I don't know specific probability of this problem but I would say it happens less than 1% of the time. So when users visit different pages, everything works fine for quite a while until one random moment it stops and they have to refresh the page to make it work again.

In meantime, I found another post mentioning similar issue and the exact same workaround with cache: false.

http://develissimo.com/blog/2013/ajax-not-working-chrome-ie8/

One more piece of information that might be quite important for jQuery: so far we have been getting support requests related to this problem only from our users who run newer version of our product that users jQuery 1.7.2. So far we have never received such ticket from clients running previous version of our product which runs jQuery 1.4. We were also unable to reproduce the problem on jQuery 1.4. This would suggest that this might be a combination of Chrome and the newer version of jQuery that causes the problem.

comment:7 Changed 6 years ago by artur.tomusiak@…

Sorry, that last post was me.

comment:8 Changed 6 years ago by dmethvin

Resolution: cantfix
Status: newclosed

If this is happening randomly and emerged after a Chrome update, it seems almost inevitable that we won't be able to fix it. I'll follow up with the Chrome team and try to find a ticket for it.

comment:9 Changed 6 years ago by artur.tomusiak@…

I have posted this on Chrome forum as well but no replies yet:

https://productforums.google.com/forum/#!msg/chrome/U-zozfchQlU/mbdEz-WOzp0J

comment:10 Changed 6 years ago by anonymous

For the record, this bug has been filed to the Chromium bug tracker: https://code.google.com/p/chromium/issues/detail?id=266971

Note: See TracTickets for help on using tickets.