This looks too strict. Shouldn't we accept redirects and cached manifests? (Unless we explicitely rejects redirects?)
What about `if (xhr.state <100 || xhr.state >= 400) {` ?
Http status code starting from 400 are errors, but also, sometimes xhr returns 0 in case of errors.
1xx, 2xx, 3xx codes should end up with a valid content.
http://en.wikipedia.org/wiki/List_of_HTTP_status_codes