JavaScript EditorFreeware JavaScript Editor     Ajax Tutorials 

Main Page

Previous Page
Next Page


This chapter introduced you to several Ajax techniques for client-server communication. It began with an HTTP primer, exploring HTTP requests and responses. You learned about the format of HTTP messages and the differences between a GET request and a POST request. The concepts of headers and message bodies were introduced.

The first Ajax technique you learned was the hidden frame technique, which uses a frame with a width or height of zero, effectively hiding it from the user. This technique uses JavaScript calls to and from the hidden frame to facilitate the client-server communication. Using the hidden frame technique, you learned how to send both GET and POST requests.

Next, you learned about replacing hidden frames with hidden iframes. Because iframes can be created dynamically using JavaScript, this may be a preferable way to initiate client-server communication in modern browsers. The same techniques were used as with hidden frames, although iframes provide a bit more flexibility in the design of your pages.

The chapter also introduced the use of XMLHttp for client-server communication. You learned that Internet Explorer, Mozilla Firefox, Safari, and Opera all support some form of XMLHttp object, and some extra coding is necessary to detect these differences. The differences between asynchronous and synchronous requests were explained, and you learned how to make GET and POST requests using XMLHttp. You also learned how to use request and response headers along with HTTP status codes to better handle requests.

Lastly, considerations when initiating client-server communication were discussed. You learned about the same origin policy and how it affects the ability to communicate with other servers. The various security restrictions were discussed along with a brief introduction to server-side proxies. You also learned about the importance of cache control when creating Ajax functionality.

Previous Page
Next Page

JavaScript EditorAjax Editor     Ajax Validator