Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xhr.status == 0 errors in ajax calls with 10% of IE8 users in ujs 2.1.2 #279

Closed
holli opened this issue Sep 18, 2012 · 0 comments
Closed

Comments

@holli
Copy link

holli commented Sep 18, 2012

We upgraded to newest ujs from version 1.0.19 and started getting complaints from IE8 users that our ajax buttons won't work. From the logs we were calculating that anything between 5%-15% of IE8 users had some problems. Problem was that we were not able to confirm this with our IE8 machines so we couldn't verify what's the problem.

We tested running totally same setup on the production, only ujs javascript was changed. With new ujs we had thousands of xhr.status == 0 errors in our analytics (and also some complaints from our users)...

I tried to check what would cause the problem by diffing ujs versions but I don't have any ideas:
http://diffchecker.com/X4ZlzlED

All the problematic ajax buttons had data-disable-with info but I don't think thats the problem. Some other ajax functions might have worked allright but it's hard to confirm this from normal users. All the advanced users use some decent browsers anyway :) E.g. draganddrop migth been functional. Go figure.

This is how we log the errors. Both to google analytics and to our server.

$jq(document).ajaxError(function(e, xhr, settings) {
    _gaq.push(['_trackEvent', 'AjaxError', "xhr.status_"+xhr.status+"_first", settings.url]);
    params = { category: 'js_error.ajaxError', 'xhr.status': xhr.status }
    $jq.post("/common/log_request", params);
});

Only common thing in user_agent infos was MSIE 8.0. Url, button, operating system etc differed.

So basically the ajax call was newer sent to our server. It resulted in ajaxError right away with xhr.status = 0.

neerajsingh0101 pushed a commit that referenced this issue Jan 24, 2013
Avoid setting withCredentials to null. Fixes #295. Fixes #279.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants