you’re on your way 4
143
asynchronous applications
But it was probably too fast for you to notice...
Break Neck Pizza isn’t called “break neck” for nothing—the request to get your address and
the response from the server happens so fast that you probably don’t have time to start typing
in your order—much less improve your golf game—before your address pops up.
Customer’s
Address
Customer’s
Phone Number
No time for typing or golf here!
The server responds with your
address almost immediately.
As soon as you type in your phone
number, the browser sends a request for
your address to the server.
<script>
var request...
function foo()
{
...
}
</script>
You probably see your address pop
up right away, before you have a
chance to do anything else.
JavaScript
PHP script
PHP Script
JavaScript