SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 38 | Next

Jonathan Snook, Aaron Gustafson, Stuart Langridge, and Dan Webb

"Accelerated DOM Scripting with Ajax, APIs, and Libraries"

For that, you need an HTTP debugger.
Firebug
As further evidence of its coolness, the debugger in Firebug traces Ajax calls, enabling you to
view the request and the response headers, as shown in Figure 1-6. This is handy to ensure
that you??™re receiving the correct data back. You can inspect the call to also see what data has
been posted to the server and what the server returned.
CHAPTER 1 n THE STATE OF JAVASCRIPT 10
Figure 1-6. Firebug Ajax call inspection
Live HTTP Headers
For more fine-grained analyses of HTTP requests, I recommend that you grab Live HTTP Headers
from http://livehttpheaders.mozdev.org. This helpful Firefox extension displays request
and response info for all HTTP requests, which can be handy for not only Ajax calls (such as the
one seen in Figure 1-7) but also monitoring page requests (including formdata), redirects, and
even server calls from Flash. It also enables you to replay specific requests. Before replaying
data, you can even modify the headers that are being sent to test various scenarios.
Figure 1-7. Live HTTP Headers Ajax call inspection
CHAPTER 1 n THE STATE OF JAVASCRIPT 11
Firebug reveals more response information, so you might have to bounce between it and
Live HTTP Headers to get a better picture of what??™s going on.
ieHTTPHeaders
IE similarly has an add-in called ieHTTPHeaders to analyze the information going back and
forth. It??™s available at www.


Pages:
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50