quello è un'esempio sincrono, non asincrono, e carica un file locale ... non va bene per Ajax on-line e lo status, online, difficilmente sarà 0 se si chiama una pagina web ... direi praticamente mai.


P.S. non so chi abbia editato nel frattempo ma io li leggo richieste a pagine URL , non a file locali, con verifica dello status giustamente a 200 e non a 0

Note: file:/// and ftp:// do not return HTTP status, which is why they return zero for status and an empty string for statusText. Refer to bug 331610 for more insight.
ma non è un bug .. è stra normale che sia così ... ma che stanno facendo in MDC? :master:


[edit]
ah ... ok, era il tipo del bug che non ha capito molto di HTTP
It's debatable that the file:// protocol handler should do that. It's not a web
server; it's simply an interface to your local filesystem, just the same as
ftp:// shouldn't return HTTP status codes.
I suggest that XMLHttpRequest should either work differently (i.e. no statuses,
although I can't see the effectiveness of this) or not at all with protocols
other than http://.
status zero è corretto ed è solo per un uso locale ... ma in generale AJax ha poco senso per un uso in locale, non esistono problemi di bandwidth ne di status quindi il readystate è praticamente inutile, si usa sincrono e al limite si fa un try catch dato che si lavora in locale e non c'è HTTP su filesystem quindi quell'esempio è corretto ma se si leggono anche le note si capisce perchè è li e a cosa serve