You’ve heard of AJAX. No, not the Dutch Football Club. Or the dollar store dish soap. We’re talking about Asynchronous JavaScript and XML. If you’ve ever used Facebook, or anything with a similarly infinite scroll, you’ve used AJAX. Let’s dive deeper into AJAX so you’ll know it when you see it. You’ll also know how to ask your developer for it on your site.
What is AJAX?
AJAX is a technique for creating better, faster, and more interactive web applications. AJAX is a concept, not a programming language. When it was first coined, it was a new way to use existing technologies.
Though you might not always consciously notice it, when you're browsing the web, data is loaded in two ways:
Synchronously: Web applications transmit information to and from the server sequentially. Example: You fill out a form, hit submit, and get directed to a new page with new information from the server.
Asynchronously (AJAX): Web applications send and retrieve data from a server independently without interfering with the display and behavior of the existing page. Example: You like a post on Facebook. The “Like” icon changes color but the rest of the page remains the same.
Where is AJAX used?
AJAX is in use all over the Internet, especially with highly-interactive sites like Facebook or web applications. You may see AJAX referenced in WordPress plugins as a way to load content. A very common use case is the “infinite scrolling” blog where, as you get to the bottom of the page, new content is loaded even though the entire page doesn't refresh. AJAX is also used in form submissions, and it’s even possible to load entire pages with AJAX.
Is AJAX right for your site?
AJAX is powerful, but it's not always practical to load content with AJAX, or allow your users to interact with your site this way. Think about the places where an interaction would be improved by the page not refreshing.
Very small or very large amounts of data can be sent and received either synchronously or with AJAX. The best way depends on the platform/content management system your site uses and the user experience you want to give your site visitors.
To see if AJAX is right for you, let’s chat! We’re here to help you make decisions, implement new features, or just talk shop.