X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fajax.js;h=bfae7824478b2090dcf5bfc3065519379e498c8d;hb=e3463946e19f2eb53d909fc2b59cc1c8636d21bd;hp=52a5a22cc3187a68c40728e81f53191618cc6b75;hpb=a44ec402771f6d622506f39073d0be260400dd21;p=jquery.git diff --git a/src/ajax.js b/src/ajax.js index 52a5a22..bfae782 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -629,9 +629,8 @@ jQuery.extend( jQuery.ajax, { try { // IE error sometimes returns 1223 when it should be 204 so treat it as success, see #1450 return !xhr.status && location.protocol === "file:" || - // Opera returns 0 when status is 304 - ( xhr.status >= 200 && xhr.status < 300 ) || - xhr.status === 304 || xhr.status === 1223 || xhr.status === 0; + xhr.status >= 200 && xhr.status < 300 || + xhr.status === 304 || xhr.status === 1223; } catch(e) {} return false; @@ -650,8 +649,7 @@ jQuery.extend( jQuery.ajax, { jQuery.ajax.etag[url] = etag; } - // Opera returns 0 when status is 304 - return xhr.status === 304 || xhr.status === 0; + return xhr.status === 304; }, httpData: function( xhr, type, s ) { @@ -686,6 +684,9 @@ jQuery.extend( jQuery.ajax, { }); +// Does this browser support XHR requests? +jQuery.support.ajax = !!jQuery.ajaxSettings.xhr(); + // For backwards compatibility jQuery.extend( jQuery.ajax );