A Faster Web

Because Performance Matters

Interactive and 'Consistently' Interactive

By Shawn MaustDecember 08, 2017

How often have you had a web site appear to load quickly, only to find that you couldn’t actually click or scroll for a while? Sometimes a site can have a fast first paint, but if the page isn’t also interactive quickly, users can quickly grow frustrated, and even leave the page.

Continue Reading →

Making the Most of Idle Moments with requestIdleCallback()

By Shawn MaustNovember 20, 2017

When executing scripts on a page, one thing we want to avoid is creating unnecessary jank for the user. This particularly true when we’re doing a lower priority task that doesn’t have to be called that exact moment. In those cases, it would be helpful to be able to delay those calls until we’re sure the browser isn’t working on something more important.

Continue Reading →

Getting Started with the Intersection Observer API

By Shawn MaustOctober 27, 2017

Each webpage is composed of various elements. And knowing where these elements are in relation to the viewport can be extremely helpful. For instance, this knowledge allows us to lazy load images, or to load additional content at the bottom of the page (e.g. infinite scroll). This knowledge can also helpful in determining when to trigger animations, or in reporting certain analytic information (e.g. which advertisements have been viewed, or how far down the page a user travels).

Continue Reading →

Performance Basics: Throttling

By Shawn MaustSeptember 26, 2017

Whenever you’re listening for events on the page, it’s important to make sure that the event listeners don’t get overwhelmed with processing incoming requests. Otherwise they can quickly become a bottleneck and cause an unnecessary performance hit.

Continue Reading →

Remembering the Cost of Evaluating and Executing Scripts

Script performance is about more than download speed

By Shawn MaustSeptember 06, 2017

When trying to optimize a page, we’ll often look at the weight of the page, and how long the browser takes to download the necessary assets. But in addition to how long it takes to download the asset, it’s also valuable to check how long it takes to evaluate and execute it, especially when it comes to our JavaScript files.

Continue Reading →