5.12. The server talks backAnytime the server sends a response to your request, it can give you information about its response using response headers. Web server HTTP/1.1 400 Bad RequestHere's part of the actual HTTP response that the Break neck server sends back to the web browser. Request Version: HTTP/1.1 Response Code: 400Here's the HTTP status code indicating an error. Date: Wed, 01 Mar 2006 21:27:39 GMT Server: Apache X-Powered-By: PHP/4.3.11 Status: No order was received.The response has a response header called "Status" in it.This part is the "value" of the "Status" response header. Connection: close Transfer-Encoding: chunked Content-Type: text/html Web Browser Internet Explorer Firefox Opera Safari Mozilla JavaScriptYour JavaScript code can access the response headers through the request object. request.getResponseHeader("Status")You can access any response header, and get its value."No order was received." The server provides the web browser information about a response using response headers. |