Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimise image and YouTube frame loading #339

Closed
MichaIng opened this issue Feb 9, 2021 · 1 comment · Fixed by #366, #379, #397 or #401
Closed

Optimise image and YouTube frame loading #339

MichaIng opened this issue Feb 9, 2021 · 1 comment · Fixed by #366, #379, #397 or #401
Assignees
Labels
performance Enhancements around SEO, page loading performance and user experience

Comments

@MichaIng
Copy link
Owner

MichaIng commented Feb 9, 2021

We should lazy load images on the docs so that they are loaded only when being scrolled to. Not all but modern browsers support it: https://squidfunk.github.io/mkdocs-material/reference/images/#image-lazy-loading
What we could additional take care of is adding the full image dimensions (not only width, but height as well), so that content shift is avoided.

The YouTube videos added a lot of JavaScript to the pages. Let's check if it is possible to lazy-load those as well, or if there are other ways, e.g. enabling the whole frame only on click or such. Also I'd like to review the client features we currently allow it to use, like accelerometer, autoplay, gyroscope, where I see no reason to allow access to such sensors, and definitely not autoplay 😉. My dream would be that the whole frame is completely unloaded until a simple link button is pressed, so no YouTube asset is loaded until interactive action.

@MichaIng MichaIng added the enhancement Content or wording enhancements label Feb 9, 2021
@MichaIng MichaIng self-assigned this Feb 9, 2021
@MichaIng MichaIng linked a pull request Feb 21, 2021 that will close this issue
@MichaIng MichaIng added performance Enhancements around SEO, page loading performance and user experience and removed enhancement Content or wording enhancements labels Feb 21, 2021
@MichaIng
Copy link
Owner Author

Finished, merged with next release: #401

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Enhancements around SEO, page loading performance and user experience
Projects
None yet
1 participant