When Google announced Gmail today, everyone thought it was a joke. One gigabyte of storage? We’re all currently deleting emails from our Hotmail accounts because we’ve hit the 2MB limit. But it’s not a joke. And while the storage is what’s grabbing the headlines, what has me fascinated is the interface. It doesn't feel like a website; it feels like an application.
In every other webmail service, when you click "Inbox," the entire page reloads. You wait for the white screen, the banners to redraw, and the lists to refresh. In Gmail, everything is instantaneous. You click, and the data just... appears.
The secret sauce is a technique we’ve been calling "Asynchronous JavaScript and XML," or AJAX. Google is heavily utilizing the XMLHttpRequest object (originally an Internet Explorer hack by Microsoft, of all things) to talk to the server in the background. Instead of the browser asking for a whole new HTML page, the JavaScript code asks for a small snippet of data and updates the page dynamically.
This is a massive shift in how we think about the web. For years, we’ve treated the browser as a document viewer. Google is treating it as a runtime environment. They’ve built a complex, "Single Page Application" (SPA) that manages its own state and handles user interaction without the constant "Click-Wait-Refresh" cycle.
Of course, this approach has its challenges. The "Back" button doesn't work quite right, and bookmarking specific emails is tricky because the URL doesn't always change. But these are solvable problems.
Gmail is proof that the web can be a platform for high-performance applications. Between this and the rumored "Google Maps," the browser is officially becoming the most important piece of software on the computer. If you’re a web developer and you haven't mastered JavaScript yet, now is the time to start.
// A simplified look at the AJAX pattern
var xhr = new XMLHttpRequest();
xhr.open('GET', '/get_emails', true);
xhr.onreadystatechange = function() {
if (xhr.readyState == 4 && xhr.status == 200) {
document.getElementById('inbox').innerHTML = xhr.responseText;
}
};
xhr.send();
The web just grew up.
Aunimeda develops websites and web applications for businesses - corporate sites, e-commerce, portals, and custom platforms.
Contact us to discuss your web project. See also: Web Development, E-commerce Development