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.

Related:  

More Articles

opinion

How to Safely Buy a Pre-Owned Adult Domain

Adrian DeGus ·
profile

WIA Profile: Ruth Blair

Women In Adult ·
profile

New Kids on the Block: FuckingAwesome.com

Rhett Pardon ·
trends

Mandatory Age Verification: A Game Changer for Adult

Stephen Yagielowicz ·
trends

The European Legal Scene: Challenges, Opportunities in 2017

Stephen Yagielowicz ·
trends

Euro Trends: Evolving a Unique Marketplace

Stephen Yagielowicz ·
profile

Q&A: Yanks.com Flourishes With Commander Todd Spaits

Alejandro Freixes ·
opinion

After a Long Summer, It Is Back to Work

Mitch Platt ·
opinion

The Adult Industry Can No Longer Be an Island

Eric Paul Leue ·
Show More