richiesta XHR è indicata come essere cancellata anche se sembra avere successo [chiuso]
-
25-10-2019 - |
Domanda
Questo non è davvero un problema, perché le opere di codice, ma Sono solo curioso di sapere perché succede.
Ho il seguente codice jQuery per un posto Ajax:
$.post('./add_fee_row/<?php echo $date; ?>',post, function(data){ ... });
Tutto funziona bene e dandy.
Tuttavia nella console di Chrome che dice:
Perché cosa dice cancellato?
Tutto è accaduto, come se il post ha avuto successo. Perché si dice che?
(il codice del server PHP è disponibile se necessario)
Sto usando la versione di Google Chrome: 17.0.942.0
Soluzione
There was a bug in Chrome DevTools, it is already fixed: http://code.google.com/p/chromium/issues/detail?id=104920
Altri suggerimenti
it may happen when Chrome sees that the actual data doesn’t match the headers.
If you return your answer with header type added, it shouldnt say canceled (Content-type: text/plain. for example)
You can check them by looking Event tabs - response headers.