DGM2740 Principles of Web Languages

This course was built by Dr. Paul Cheney for the Digital Media Department at UVU

Unit09 Lazy Loading

Objectives

Overview

Another part of being responsive is controlling the load time of a page. One way to do this is to use jQuery to lazy load a page.

Long pages with lots of images can take a while to load especially if they are big and beautiful. Many of your site visitors may only see the top of the page and then leave. There is no reason to load all the images if they don’t intend to see them all. Lazy loading can be done using a jQuery plugin.

Learning Activities

All videos listed below are available on UDEMY

Assignments

Reflection Questions

You will please submit the answers to these questions in Canvas

Example

View the example of a lazy load page with grey placeholders

View an example of a lazy load page with highly compressed grey scale versions of the placeholders

View an example of a page with AddToHome done inappropriately (for testing purposes)

View an example of a page with AddToHome done appropriately so it only asks twice and only after the second visit.