102
Chapter 2
Podcasting Studio
HeadRush: We’re here today with the ever-popular Web Browser. Browser, we’ve
been really looking forward to talking with you today.
Web Browser: Thanks for having me, HeadRush.
HeadRush: Let’s begin by talking about requests and ready states. We get more
questions on that topic than almost anything else these days.
Web Browser: Sure, I’d love to talk about that. In fact, ready states are one of the few areas where people
actually notice me. Most of the time, everyone would rather talk about JavaScript and PHP.
HeadRush: Well, those are awfully important programming languages...
Web Browser: Sure, sure, but what good is JavaScript without me and Callback? I mean, without us,
JavaScript is just a bunch of funny looking lines of text.
HeadRush: Wait a second... Callback? Who’s that? I’m not really familiar with that term.
Web Browser: Callback? Oh, I bet you’ve heard of him, and just don’t realize it. You know that function
I’m supposed to run whenever a request’s ready state changes?
HeadRush: Yeah, that’s the one you assign to the request object’s onreadystatechange property, right?
Web Browser: Exactly. Well, that’s Callback. He’s a special type of function: a callback function. But I
usually just say, “Callback!”, and he comes running.
HeadRush: OK, I’m with you. Callback... because you call him back?
Web Browser: Yes, you’ve got the idea now. I nd out that ...