GithubHelp home page GithubHelp logo

Comments (7)

verlok avatar verlok commented on April 29, 2024 1

Another thing I get tired to say to the front-end teams I work with is to load the alternative image (which is shown only at mouseover) only at mouseover.

You can read more best practices on how to load images on a repo I’ve recently created.

https://github.com/verlok/productListingPageBestPractices/

What do you think?

from front-end-performance-checklist.

thedaviddias avatar thedaviddias commented on April 29, 2024

You're welcome @verlok and thank you so much for the work! I totally agree with you, it's indeed not specified but should be in the Checklist. Do you want to do a PR?

Thanks to point that out!

from front-end-performance-checklist.

verlok avatar verlok commented on April 29, 2024

Sure! Will do. I just wanted to know what you think about that before doing that.

from front-end-performance-checklist.

thedaviddias avatar thedaviddias commented on April 29, 2024

Hi @verlok, I was reviewing your previous message and I was wondering why on mouseover and not on scrolling?

from front-end-performance-checklist.

verlok avatar verlok commented on April 29, 2024

In most e-commerce websites e.g. yoox.com and others there is an alternative shot shown at mouseover, showing the cloth weared by a model.

My point is: don’t load those alternative images at page landing, but load them lazily when the user requests them, mouseover-ing the product.

If you take a look at this repo and the related live demo, it will all be clear.

from front-end-performance-checklist.

Brunomaio avatar Brunomaio commented on April 29, 2024

And now we got native lazy loading (sorry if it's already in the checklist / mentioned anywhere
https://addyosmani.com/blog/lazy-loading/

from front-end-performance-checklist.

verlok avatar verlok commented on April 29, 2024

@Brunomaio it’s not a thing yet. Native lazyloading will come with Chrome 75 and only under a flag.

Anyway, my vanilla-lazyload script already supports native lazyloading, so you can use the LazyLoad script to do native lazyloading where supported, and JavaScript lazyloading where not supported.

Read this for more information:
https://www.andreaverlicchi.eu/native-lazy-loading-with-vanilla-lazyload/

from front-end-performance-checklist.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.