Page 1 of 1
Youtube videos
Posted: Sat May 21, 2022 7:42 pm
by Lasa
Hi,
I have two youtube video on my home page under the fold... I have them set for lazy load so that in theory they don't slowdown the page load since they are under the fold (?).. but they seem to be a have heavy toll on the load time regardless... any ideas?
Lasa
Re: Youtube videos
Posted: Sun May 22, 2022 3:53 am
by wwonderfull
The video should not preload so disable that checkbox and see if the page loads faster.
Re: Youtube videos
Posted: Sun May 22, 2022 6:37 am
by Pablo
Note that Lazy load is a standard browser functionality. Whether or not it works, depends on the browser.
For example, in FireFox it currently only works for images.
https://caniuse.com/loading-lazy-attr
Re: Youtube videos
Posted: Sun May 22, 2022 4:23 pm
by Lasa
Thank you both!
Lasa
Re: Youtube videos
Posted: Wed May 25, 2022 2:18 pm
by Lasa
Still having issues with youtube js's hogging the lion share on the download time...
Not so much on the desktop numbers seem ok, but killing the mobile.
I tried checking: lazy load and unchecking both are hogs. Granted the lazyload seems to do better.
Anybody have other ideas?
Lasa
Re: Youtube videos
Posted: Wed May 25, 2022 2:25 pm
by crispy68
I think it is what it is. You don't have any control over youtube videos and lazy loading is the best option. If they are large videos they are going to take some time to load at some point.
Re: Youtube videos
Posted: Wed May 25, 2022 2:39 pm
by Lasa
I know you're right.
I just imagen that there is a way to put up an image of the video (with play button and all) that when you click it, it call the video to load.
I don't have a clue of what I'm saying.
Thanks,
Lasa
Re: Youtube videos
Posted: Wed May 25, 2022 3:51 pm
by Pablo
This is possible via the 'lightbox' option.
Re: Youtube videos
Posted: Wed May 25, 2022 6:54 pm
by Lasa
Thanks
Re: Youtube videos
Posted: Wed May 25, 2022 9:53 pm
by Lasa
Wow...just for the record, the site I'm working on:
google pagespeed scores:
Without the 2 youtube videos, scores 92 mobile - 94 desktop.
with the 2 youtube videos, scores 47 mobile - 87 desktop
My other none youtube showing sites all show 90's + for both mobile/desktop
I know these download numbers are subjective and can't be the end all of website building...
But it is a pretty much a wow to me.
Lasa
Re: Youtube videos
Posted: Sun May 29, 2022 1:47 pm
by Lasa
I know I'm beating a dead horse but now I'm abscessed with it.
Has anybody got improved pageload speed with the default lazyload option enabled?
I do not think the lazy load option is actually working? If I check or uncheck the youtube lazyload option, I get the exact same results?
Both Chrome and Firefox have it loading way before it show on any screen or clicked, slowing the load down substantially.
If I remove the videos my pageload speed goes into the 90's on both mobile and desktop.
Otherwise in the 40-50's mobile, 70-80 for desktop with the youtube videos.
I've tried a ton of youtube lazyload codes but can't seem to get them to work load...that more about my total lack of coding skills then the codes themselves.
Any help
Lasa
Re: Youtube videos
Posted: Sun May 29, 2022 2:35 pm
by Pablo
This is unrelated to WWB. It's just an option you can enable. the logic in implemented in the browser.
To learn more about how lazyload works please see:
https://web.dev/lazy-loading/
https://addyosmani.com/blog/better-imag ... in-chrome/
Re: Youtube videos
Posted: Sun May 29, 2022 3:34 pm
by Lasa
Thanks, I've looked at your links and a few zillion more, but it's all gibberish to me. I wish I understood it better.
I understand it's unrelated to WWB and that the lazy load is another of a long list of options... might or might not work.
I'll keep digging, eventually I will figure it out...always open to suggestions.
Cheers,
Lasa
Re: Youtube videos
Posted: Sun May 29, 2022 5:30 pm
by Lasa
I found something called vanilla-lazyload that does the trick no load what-so-ever on the pageload.
but since i do not know what I'm doing I can't seem to make it responsive... probably with error, etc.;
http://threefooter.com/tradefair2023/
But, maybe others here can figure it out..the instructions are here:
https://ourcodeworld.com/articles/read/ ... mbed-video
Cheers
Lasa
Re: Youtube videos
Posted: Sun May 29, 2022 5:47 pm
by alan_sh
Does lazy loading work with videos?
Alan
Re: Youtube videos
Posted: Sun May 29, 2022 6:24 pm
by Lasa
The WWB Youtube tool has an option for lazyload... but it doesn't seem to work for me, maybe it does for others.
But when I tried vanilla-lazyload on the youtube links it definitely worked! I kind-of got it to work on my sample site,(not responsive for some reason) I know it's not right yet but I'm just going by trial and error... lot's or error, lol
Lasa
Re: Youtube videos
Posted: Sun May 29, 2022 7:33 pm
by Pablo
Lazy load is not an option of WWB, it's an HTML option.
Whether of not it works deepness on the implementation int he browser. WWB has no control over it. It just adds the option to the HTML code.
Re: Youtube videos
Posted: Sun May 29, 2022 8:14 pm
by Lasa
I meant there was an option "listed" in the youtube tool/general which I now know is not part of WWB, my bad.
Still looking for a way to "lazy load" a youtube video... will report it when I figure it out...getting closer
Cheers,
Lasa
Re: Youtube videos
Posted: Mon May 30, 2022 12:10 pm
by Lasa
Was able to use a on-click lazyload called lazyYT... what it does is it uses a small js file that shows an image that needs to be clicked to activate the youtube to download...so the delay is at the click time not page load. It helps get crazy good Google pageload numbers since youtube js's don't get loaded until clicked.
I'm not sure I will keep it but I like that it doesn't slow down the load speed but then again it loads the video a tad slower...
We'll see it's interesting.
http://exportimporttradeshow.com/
Thanks Pablo,
Cheers,
Lasa