XmlHttpRequests are shown in the network view of Web Inspector and Request and Response Headers are shown, too.
For each request an item is placed under the “OTHER” node but the content is not viewable when clicking that icon. Neither for things sent with application/xml nor text/html. Images are not previewed either if loaded via XHR and are placed under “OTHER” as well.
*** Bug 16616 has been marked as a duplicate of this bug. ***
Created attachment 19945 [details]
Test cases to view XHR behavior
Could you clarify what you mean by loading images via XHR? I've attached a test case that uses XHR to load images but doesn't actually send the image via XHR except in the case of a 64bit encoded image.
Nice test case. I don’t know whether you intentionally left out the xhrCSS.css file, though (at least it was missing for me).
It works as expected wrt images now. If you watch the Web Inspector closely you will see that the images are first appended to the OTHER node and some time later (maybe after they are fully loaded) moved to the IMAGES node. The base64 encoded image has a duplicate as xhrKevinMcCullough.txt in the OTHER view. (This might actually be desirable, if one could actually view the data, see below.)
For all other data delivered via XHR the documents (xhrCSS.css, xhrHTML.html, xhrXML.xml) show up under OTHER, regardless of Content-Type and their content cannot be inspected by clicking on them. The right hand pane stays empty.
When I created the bug, images were not moved to the IMAGES node and thus could not be viewed. The only thing left would be to show the contents of OTHER documents, at least when the Content-Type indicates them as not binary or something. XML, HTML and JSON data really should be viewable for debugging purposes.
Created attachment 20008 [details]
New archive with missing CSS file
Oops good call, I've uploaded a new test case with the CSS. Yes, the type of the images is not determined until they are fully loaded although I haven't searched the code enough to know why. I think it is ok for now for them to be in other until they fully load. At least they end up in the right place after the fact.
And yes everything else ends up in other. The reason for this is that the Inspector Controller asks for the CachedResource of each resource, but the subresource load for XHR is not cached, so there is no type information or data to display for XHR resources.
We are working on a way for the InspectorController to cache the XHR resources, but we want to be careful to not hog resources or affect the browsing experience when people don't need the Inspector.
This can be closed now.