60
Chapter 1
60 Second Review
ü Traditional web programming involves
making requests to a server, and getting
back a response, usually with updated data
wrapped up in a completely new HTML page.
ü Ajax apps use asynchronous JavaScript.
ü Ajax applications can make requests and get
responses without reloading an entire page.
ü Asynchronous JavaScript doesn’t wait on a
server to respond to a request. Users can
keep using a page, even while the server is
still working on the request.
ü Web browsers turn HTML and CSS into
pages you can see on your screen, and take
care of running any JavaScript in the page.
ü In Ajax applications, servers usually send
back just the data you request, without any
additional HTML markup and presentation.
ü You can use JavaScript to make both
synchronous and asynchronous requests to
a web server.
ü JavaScript offers several event handlers to
call JavaScript code when certain events
happen; onChange() and onClick() are two
common examples.
ü The browser always knows what ready state
a request is in, and makes that available to
your JavaScript functions.
ü You can have the browser run a JavaScript
function every time a request’s ready state
changes using the onreadystatechange
property in your request object.
ü When the ready state of a request is “4”, the
request has been processed, and the server
has a response ready.
reviewing chapter 1