O'Reilly logo

Even Faster Web Sites by Steve Souders

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2. Creating Responsive Web Applications

Ben Galbraith

Dion Almaer

With the rise of Ajax, web site performance is no longer just about the quick realization of a web site. An ever-increasing number of web sites, once loaded, will use JavaScript to dynamically change the page and load new content on the fly. Such sites have much in common with traditional desktop client programs, and optimizing the performance of these applications requires a different set of techniques from traditional web sites.

From a high level, user interfaces for web applications and traditional desktop applications share a common goal: respond to the user’s input as fast as possible. When it comes to responding to a user’s request to load a web site, the browser itself handles much of the responsiveness burden. It opens network connections to the requested site, parses the HTML, requests the associated resources, and so forth. Based on a careful analysis of this process, we can optimize our pages to render as fast as possible, but the browser is ultimately in control of loading and realizing the page.

When it comes to responding to user input to the web site itself (when that input doesn’t result in the browser loading a new page), we web developers are in control. We must ensure that the JavaScript that executes as a result of such input is responsive. To better understand just how much control we have over responsiveness, we’re going to take a minute to explain how browser user interfaces work.

As shown ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required