You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
Hi, I'm developing offline capabilities for one webapp and I realised here that you change HTTP status from 0 to 404.
I would like to detect the 0 status code and stop the sync process, but now it's no reliable at all.
We can assume that all 0 responses are related when there's no connection to server? I thought it was like this, I'm missing something?
The related code:
functioncompleteRequest(callback,status,response,headersString){// cancel timeout and subsequent timeout promise resolutiontimeoutId&&$browserDefer.cancel(timeoutId);jsonpDone=xhr=null;// fix status code when it is 0 (0 status is undocumented).// Occurs when accessing file resources.// On Android 4.1 stock browser it occurs while retrieving files from application cache.status=(status===0) ? (response ? 200 : 404) : status;// normalize IE bug (http://bugs.jquery.com/ticket/1450)status=status==1223 ? 204 : status;callback(status,response,headersString);$browser.$$completeOutstandingRequest(noop);}};
Hi, I'm developing offline capabilities for one webapp and I realised here that you change HTTP status from
0
to404
.I would like to detect the
0
status code and stop the sync process, but now it's no reliable at all.We can assume that all
0
responses are related when there's no connection to server? I thought it was like this, I'm missing something?The related code:
W3C spec: http://www.w3.org/TR/XMLHttpRequest/#the-status-attribute
Thanks.
The text was updated successfully, but these errors were encountered: