What exactly triggers jQuery ajax success?
The success
handler will be triggered if
- The response has HTTP status code
200
(yours does) - jQuery is able to deserialize the response according to the
Content-Type
header in the response (or thedataType
option, if you provide it, which overrides theContent-Type
header)
So for instance, if your response had a Content-Type
header of application/json
or application/xml
, the response you've quoted won't trigger the success
handler because it cannot be successfully deserialized as either JSON or XML.
Your latest edit (as of this writing) reveals the problem:
Here are the response headers from jQuery getAllResponseHeaders()
...
Content-Type: text/xml; charset=utf-8
I suspect your response isn't valid XML, so jQuery can't deserialize it as XML, so it's failing.