2.32. What is the browser doing?You've seen what the Break Neck server is doing, and you're written a lot of new JavaScript, but what's the browser doing as all these ready states are changing? Let's take a look and find out: Web BrowserThese are the request's ready states. 11. The browser runs getCustomerInfo(), and a request is made to the Break Neck web server. 22. As the request is being worked on, the ready state of the request is changed to reflect what stage of processing the request is in. 33. Each time the ready state of the request changes, the browser runs your callback function, updatePage(). PHP script 4updatePage()4. updatePage() checks the request object's ready state, and only keeps running if the request is finished. JavaScript 55. When the browser gets a completed response from the server, it stores the server's response in the request object. 66. If the request is finished, updatePage() can get the server's response from the request object. The browser makes a server's response available to your code through the JavaScript request object. |