cerner / cerner.github.io

Cerner Engineering blog
https://engineering.cerner.com
14 stars 28 forks source link

Lazy load YouTube embedded video references #57

Open Kallie-Riff opened 7 years ago

Kallie-Riff commented 7 years ago

Currently the tech-talk tab loads all videos into the page during render. These videos should be 'lazy loaded' onto the page - so when the user clicks play the video will load but not before that happens. We will use the same design for the upcoming internal speakers tab.

Thinking about using something similar to this to solve the issue.

If load speeds are still slow after this change we could consider looking at pagination (might want this anyway for better usability).

anelson425 commented 7 years ago

This is a good strategy, loading the content during render is less than ideal, especially as the content grows. Lazy loading them will allow viewers pick and choose what is worth loading to them.

cchesser commented 4 years ago

I'm going to pull this into our uplift of the site. We are doing doing an embedded YouTube video inclusion, but can optimize the generated HTML for the embedded view. In this uplift, we are also using the latest of Bootstrap, which also has options:

https://medium.com/@ryanlebel/speed-up-page-load-time-c6b9148d0a2