The term AJAX may have not been coined until 2005, but it’s origin stretches all the way back to the early 2000’s, when browsers provided developers with the glue between clients and servers.
In the summer of 2001, Paul Bucheit sent a website he was working on to his friends and colleagues. The site was an application where users could search through thousands of emails at a time and get back relevant results.
Bucheit had finished the software in a single day, so it was a bit rough around the edges. But there was really only a single request from his friends. It would be great if the software could search through their emails. See, in its first version, only Bucheit’s email was accessible to every user that visited the site. Bucheit made a note of that and got back to work.
Google released Gmail to the public a few years later. It had more than a few things going for it. Gmail came with 1GB of storage (most competitors offered 4MB) and effective search. At the beginning the only way to get access was through an invite, so it had an exclusive feel. And most impressively, Gmail’s interface was snappy and responsive. The search bar would autocomplete as you typed. Conversations were organized into expandable, easy to read threads. And every time you clicked on an email, the message would load almost instantly. There was no doubt about it. Gmail was on the web, but it felt like a desktop application.
When Google acquired Where2 Technologies in 2004, the Rasmussen brothers were close to their last legs. A last minute investment deal had gone south and the two were in trouble of losing their company. Google’s acquisition came just in time to save them. For the last several years, Lars and Jen Ramussen had been working on a map application with a fresh interface. The app was based one the concept of tiles. Each tile represented a small part of the map, and stitching them together allowed users to navigate the map just by scrubbing their mouse around.
The app was built for the desktop, but Google co-founder Larry Page was a big fan of the web. He pushed the newly absorbed team to recreate their application as a website. Unaware of what was going on with Gmail, the team went about recreating their technology in the browser. Not too long after that, in February of 2005, Google Maps went into beta.
Both Gmail and Google Maps shared more than just a parent company in common. Their interfaces were both dynamic and performant and on the very cutting edge. They felt like the future of the web. And they both made judicious use of JavaScript. This allowed them to connect to a server asynchronously, and pull down new data without loading a new page. They had Microsoft to thank for that particular feature.
At the time, there was some pretty interesting things going on at Microsoft. Starting with Internet Explorer 3, Microsoft had added their own implementation of the Java Virtual Machine to the Windows operating system, and IE specifically, for the purpose of running Java applets. But almost as soon as they did, Sun (the creator of Java) sued Microsoft for failing to comply fully with the Java standard. Microsoft, already embroiled in a much larger antitrust suit, decided that they would simply remove Java from their operating system, and that would be that.
There was just one problem. In order to get some of the more advanced features of their Outlook email web app to work, they had relied on some of the Java components of Internet Explorer. So to plug this gap, right before the release of Internet Explorer 5 in 1999, Microsoft added a new JavaScript function to the browser called XMLHttpRequest. This allowed the browser to make an HTTP request to the server and get back some data in XML behind the scenes.
What that means is that data could be refreshed on the page without a full reload. It served its purpose pretty well. But all that work was just to get the Outlook website working the way it was supposed to.
But that didn’t stop other browsers from adopting this new functionality. Mozilla soon followed suit with an implementation of their own in Firefox. The function was used here and there over the next couple of years. The most notable of the bunch was Oddpost, an email web application. Oddpost made a lot design decisions in their application that have stuck around in email applications, such as the three-pane window. As far back as 2002, they were using the XMLHttpRequest function pretty extensively in their application. However, the site was paid and therefore didn’t receive that much attention until it was bought by Yahoo in 2005.
It was this same function that brought Gmail and Google Maps to life. For both teams, HTML wasn’t going to cut it on its own. JavaScript would have to pull it all together.
Bucheit at Gmail, and the Rasmussen brothers at Google Maps were told that relying so heavily on JavaScript was a big mistake. There was certainly some truth to that. At the time, implementation across browsers was spotty and diverse. And unlike the forgiving nature of HTML, if you screwed up in JavaScript you could crash the browser.
Even so, they pulled it off. Users took notice. The ability to fly through thousands of emails or scroll through a map tile by tile, without a lag, was… Well it was just plain incomparable. There have been a few times when the way the world thinks about the web makes a big shift. This was one of them. Both services took off, and in no time, the techniques behind them did too.
Subsequently, Jesse James Garett of Adaptive Path finally gave this use of Javascript a name. He called it Asynchronous Javascript and XML (thankfully shortened to Ajax). Ajax wasn’t a single method or technology, but a group of principles based on the work being done at Google that described how to handle JavaScript in more demanding web applications. The short version is actually fairly simple. Use XMLHttpRequest to make request to the server, take the XML data returned, and lay it out on the page using JavaScript and semantic HTML.
Ajax took off after that. It underpins major parts of modern web development, and has spawned a number of frameworks and methodologies. The technology itself has been swapped out over time. XML was replaced by JSON, and XMLHttpRequest by fetch. That doesn’t matter though. Ajax showed a lot of developers that the web wasn’t just about documents. The web could be used to build applications. That might seem like a small notion, but trust me when I say, it was momentous.
Sources
- Stephen Hutcheon. "The Untold Story About the Founding of Google Maps." Medium. February 2, 2015. https://medium.com/@lewgus/the-untold-story-about-the-founding-of-google-maps-e4a5430aec92#.84k7kx7o8
- Liz Gannes. "Ten Years of Google Maps, From Slashdot to Ground Truth." Recode. February 2, 2015. http://www.recode.net/2015/2/8/11558788/ten-years-of-google-maps-from-slashdot-to-ground-truth
- Harry McCracken. "How Gmail Happened: The Inside Story of Its Launch 10 Years Ago." Time. April 4, 2014. http://time.com/43263/gmail-10th-anniversary/
- Rob Larsen. "An introduction to Ajax." IBM. June 6, 2011. http://www.ibm.com/developerworks/library/wa-aj-ajaxhistory/
- Paul Bucheit. "Overnight success takes a long time." Paul Bucheit. January 1, 2009. http://paulbuchheit.blogspot.com/2009/01/overnight-success-takes-long-time.html
- "The birth of AJAX – an amazing story." Techtracer. March 3, 2007. http://techtracer.com/2007/03/12/the-birth-of-ajax-an-amazing-story/
- Jessica Livingston. Founders at Work: Stories of Startups’ Early Days. Berkeley, CA: Apress, 2007.
- Aaron Swartz. "A Brief History of Ajax." Raw Thought. December 12, 2005. http://www.aaronsw.com/weblog/ajaxhistory
- Paul Bucheit. "Guess what just turned 34?." Google. October 10, 2005. https://googleblog.blogspot.com/2005/10/guess-what-just-turned-34.html
- Jesse James Garrett. "Ajax: A New Approach to Web Applications." Adaptive Path. February 2, 2005. https://web.archive.org/web/20080702075113/http://www.adaptivepath.com/ideas/essays/archives/000385.php
- "Google Launches Mapping Service." Slashdot. February 2, 2005. https://tech.slashdot.org/story/05/02/08/0926214/google-launches-mapping-service