Web Depot: Boost Perceived Page Speeds

Stephen Yagielowicz

Everyone wants a fast loading website, especially mobile users and others with slower connections — with “lazy loading” a way to make a site seem faster. According to its author, Michael Cavalea, Layzr.js is a small, fast, modern and dependency-free lazy loading library.

“Lazy loading boosts page speed by deferring the loading of images until they’re in (or near) the viewport. This library makes it completely painless — maximizing speed by keeping options to a minimum,” Cavalea explains. “The scroll event has been debounced to minimize the weight on the browser, and images are revealed [with] optimal rendering.”

Each image requires a placeholder in its SRC attribute, plus a URL for a regular and a Retina image, while a variable threshold rate adjustments to the speed at which images load. A callback function is invoked each time an image is loaded, enabling Layzr.js to be easily extended.


More Articles


Q&A: Vera Sky Dons the Crown for 2017 XBIZ Best Cam Model

Alejandro Freixes ·

Why It Pays When Cam Models Block Cyberbullies

Mia Saldarriaga ·

Casey Heart Talks Cam Past, Future

Casey Heart ·

Less Is More for Live Cam Member Promotions

Steve Hamilton ·

Melody Kush Dishes on Camming Career

Melody Kush ·

WIA Profile: Laurie Biviano

Women In Adult ·

Jules Jordan's Ezra Kamer Pushes Boundaries of Tech

Rhett Pardon ·

Paysites Innovate to Maintain Competitive Edge

Stephen Yagielowicz ·

Leading Paysites Pursue New Members, Retain Fans

Stephen Yagielowicz ·
Show More