How does an Ajax HTTP response look like. I am note sure if its in xml
or as a div
tag. I know its not in html as it is only updating a section of html page. So if a simple web page with a text field value change and an area of a page is to be updated as a result of text change in field, how does the body construct of the AJAX response look like?
HTTP / 1.1 200 OK
Content-Type: text/plain
...
...
BODY?
the ajax response will be whatever the server returns to the client if you print html the response will be in html if you print xml the return will be xml...
<?php
echo "<div>Some text</div>";
?>
The response will be:
<div>Some text</div>
All Ajax I've used responds with JSON. If you use chrome you can check the response in DevTools.
This answer is on my mobile, I'll fill out more from home.