Bonjour,
J'essaye de trouver des infos sur le comportement précis des navigateurs concernant les différentes valeurs du champ : readyState.
Sur https://developer.mozilla.org/en/XmlHttpRequest:
il est dit
Dans ce même document il est aussi fait référence au spec du w3c :The state of the request:
Value State Description
0 UNINITIALIZED open() has not been called yet.
1 LOADING send() has not been called yet.
2 LOADED send() has been called, and headers and status are available.
3 INTERACTIVE Downloading; responseText holds partial data.
4 COMPLETED The operation is complete.
http://www.w3.org/TR/XMLHttpRequest/
Mais dans cette page il est précisé:
Il y a donc une différence entre ce qui est implémenté par Firefox et ce que la spec précise.States
The XMLHttpRequest object can be in several states. The readyState attribute, on getting, must return the current state, which must be one of the following values:
UNSENT (numeric value 0)
The object has been constructed.
OPENED (numeric value 1)
The open() method has been successfully invoked. During this state request headers can be set using setRequestHeader() and the request can be made using the send() method.
HEADERS_RECEIVED (numeric value 2)
All HTTP headers have been received. Several response members of the object are now available.
LOADING (numeric value 3)
The response entity body is being received.
DONE (numeric value 4)
The data transfer has been completed or something went wrong during the transfer (e.g. infinite redirects).
Comment savoir si un navigateur répond correctement à la spec?
Plus généralement, ou pourrais-je trouver des informations à ce sujet ?
Merci par avance.
Partager