T
Tim Streater
In my app, the browser is making ajax calls to various PHP scripts. This
is all happening on one host, mediated by a local instance of apache
that is configured to respond only to localhost requests. Ordinarily,
this all works fine.
Recently I've noticed the app working poorly because of, the browser
claims, 404 responses to requests for some scripts. Since these scripts
*do* exist, I view this as a symptom of another problem, but in the
meantime I want my app to notice these failures, clean up, and put a
note in the log. That way I can at least see if the problem correlates
with something.
To implement this approach, the callback function now also gets called
if I have readyState==4 and status!=200. All the callback functions are
now set to see this and clean up, etc.
Now my problem is this: if I rename one of the scripts for testing
purposes, to force a 404, I don't see *any* onreadystatechange events -
the request.onreadystatechange function is not getting called. I've
tested this with a tiny example using code extracted from the app, and
there, it works as expected.
Any suggestions as to circumstances under which onreadystatechange
events don't occur when expected would be appreciated.
is all happening on one host, mediated by a local instance of apache
that is configured to respond only to localhost requests. Ordinarily,
this all works fine.
Recently I've noticed the app working poorly because of, the browser
claims, 404 responses to requests for some scripts. Since these scripts
*do* exist, I view this as a symptom of another problem, but in the
meantime I want my app to notice these failures, clean up, and put a
note in the log. That way I can at least see if the problem correlates
with something.
To implement this approach, the callback function now also gets called
if I have readyState==4 and status!=200. All the callback functions are
now set to see this and clean up, etc.
Now my problem is this: if I rename one of the scripts for testing
purposes, to force a 404, I don't see *any* onreadystatechange events -
the request.onreadystatechange function is not getting called. I've
tested this with a tiny example using code extracted from the app, and
there, it works as expected.
Any suggestions as to circumstances under which onreadystatechange
events don't occur when expected would be appreciated.