Welche Serverantwort verursacht AjaxError im Browser-Ajax-Handler? Unterscheidet sich dieser Fehlercode von 200 oder nicht leerem speziellen json-Feld?Was ist ein Ajax-Fehler?
1
A
Antwort
1
Ja, nicht-200 Antwortcodes kann verursachen einen Fehler, you can see what constitutes "success" here:
httpSuccess: function(xhr) {
try {
// IE error sometimes returns 1223 when it should be 204 so treat it as success, see #1450
return !xhr.status && location.protocol === "file:" ||
xhr.status >= 200 && xhr.status < 300 ||
xhr.status === 304 || xhr.status === 1223;
} catch(e) {}
return false;
}
Dies als von jQuery ist 1.4.4, frühere ein Statuscode 0
auch erfolgreich war, weil Opera 304
war berichtet als 0
... dass Nachsicht wurde entfernt, um falsche Positive für den Erfolg zu beseitigen. Wenn die obige Überprüfung false
, the error handler is called ist.
Verwandte Themen
- 1. Was ist ein PHP-Framework und was ist ein guter?
- 2. Google AMP: Was ist ein Layout? Was ist ein Behälter?
- 3. Was ist ein Protokoll?
- 4. Was ist ein Objekt?
- 5. Was ist ein "Pinsel"?
- 6. Was ist ein UIViewController
- 7. Was ist ein Kontextwechsel?
- 8. Was ist ein Inferenztyp?
- 9. Was ist ein Pastenskript?
- 10. Was ist ein Gruppenleiter
- 11. Was ist ein Bitmuster?
- 12. Was ist ein CGVector?
- 13. Was ist ein tGrid?
- 14. Was ist ein LPTHREAD_START_ROUTINE?
- 15. Was ist ein ImageObserver?
- 16. Was ist ein "Doppelstapelfehler"?
- 17. Was ist ein Pushlock?
- 18. Was ist ein Arbeitssatz?
- 19. Was ist ein Jamfile?
- 20. Was ist ein Zustandsraum?
- 21. Was ist ein Handler
- 22. Was ist ein Rauchtest?
- 23. Was ist ein Ereignishandle?
- 24. Was ist ein StackOverflowError?
- 25. Was ist ein Datenbankindex?
- 26. Was ist ein `char *`?
- 27. Was ist ein Endpunkt?
- 28. Was ist ein SSTable?
- 29. Was ist ein Tabellenpräfix?
- 30. Was ist ein Stammverzeichnis?