15. Ajax

Ajax used to be an acronym for “Asynchronous JavaScript and XML,” but now it’s just a buzzword for highly dynamic Web pages. With Ajax, you have the ability to send and receive data from your server without having to load a whole new page. This allows you to do the following:

• Quickly load additional content only when the user needs it, making your initial page load smaller

• Send data from links and forms back to the server without a page refresh, which makes your pages feel faster

The XMLHttpRequest object makes Ajax possible. Originally a Microsoft innovation, all modern browsers support it without too many cross-browser inconsistencies. I recommend researching how to use the native XMLHttpRequest object to understand what’s going ...

Get The JavaScript PocketGuide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.