-
Task
-
Resolution: Released
-
Must have
-
None
-
5
-
Performance
-
Sprint #155
-
venus
It seems that youtube-nocookie is adding a lot of data transfer to the page load. The player scripts is around 500Kb (compressed, file is 1.6MB uncompressed).
Perhaps there is a smaller alternative. We can probably also prevent the script from loading until the user interacts with a video.
Performance Tests
I found this article describing how to lazy load regular youtube embeds. It could also work for youtube-nocookie, but since this technique requires a user interaction to load anything but the thumbnail, we maybe wouldn't need nocookie anymore. https://dev.to/haggen/lazy-load-embedded-youtube-videos-520g
Tasks
- Try lazy-load the iframe
- Investigate loading the script on first user interaction
- causes
-
PLANET-5970 YouTube video don't render in full width
- CLOSED