DEV Community

Discussion on: What is an example of how an application can anticipate user behavior?

Collapse
 
michaeltharrington profile image
Michael Tharrington

First off, I'm a non-developer, so please tell me if you think I got any of this wrong...

I'd argue that lazy loading is a performance strategy that tries to anticipate user behavior. From Mozilla:

Lazy loading is a strategy to identify resources as non-blocking (non-critical) and load these only when needed. It's a way to shorten the length of the critical rendering path, which translates into reduced page load times

Lazy loading can occur on different moments in the application, but it typically happens on some user interactions such as scrolling and navigation.

If you think about lazy loading in the context of "scrolling", the site anticipates that a user is going to land on the page and see the assets that are at the top of the page and so it loads these first, only after scrolling down does the site load these other assets.