This is related to the docs and the theme we use:
### What is lazy loading?
Check it out here.
Lazy loading help in masking less time to load if told simply and makes our docs load faster. This currently is not applicable because our docs are not yet filled with pictures and videos(This doesn't worry us if we are to use youtube videos ) but it could be in some time. See https://web.dev/lazy-loading/#why for more info on why we need it.
One simple thing which can be done for now is using native-browser-lazy-loading, but yes, some browsers don't support it see here. But we can implement a JS-based lazy loading easily if we were to edit the theme and I recommend using this because sometimes I use IE for browsing(haha).
Seeing https://web.dev/lazy-loading/#implementing seems helpful. Also, I on browsing got this site http://jquery.eisbehr.de/lazy/, and yes found it the best. Our theme currently uses jquery and yes this can be easily implemented.
So, I think we are gonna use Jsdelivr as CDN, yes, then we need to have a placeholder(a lightweight image may be blurred), and add it to use it. maybe I suggest we can have our logo(not yet ready :() as our placeholder and it can save some space and would look nice.
This sounds good. I appreciate you bringing this up and identifying a few alternatives.
In general, I'm against _solving problems that we don't have yet_. In my opinion, we should keep building documentation and once we hit loading problems, start actually implementing this. One problem in pre-emptively fixing this before it actually becomes a problem is the following: you say that the solution you found works with jquery, which our theme is already using. But we don't know if we will keep using the current theme. Maybe we'll find a problem tomorrow and we have to change. So we will have to change the lazy loading as well. So it's better to wait until things stabilize a bit (and we actually have this as an issue) before fixing it I think.
"Don't fix what is not broken" ;)
It will just appear as soon as we add some more pictures and videos lol.
Nevertheless, what you say is correct. What I think is that we can create a theme ourselves and maintain it instead of randomly changing the theme and also fix this problem(could create a huge impact on loading time). Also, nearly all the themes uses bootstrap along with jquery, so it will be very easy to implement this if we somehow find a way to add java script. Or more efficiently we can use webpack as done by read the docs theme, and create a single js file. All these are for future when we start with our own theme.
I had opened this issue just for the sake recording things as they may be useful for future reference. For now this is not a problem and I am closing this.
It will just appear as soon as we add some more pictures and videos lol.
This really depends on the size of the videos -- and actually even more on the images. The largest video in our documentation currently (yes, the current status is not really a great reference point) has about 90kB (and for videos, loading at play time instead at page load can be enabled -- for images, this is another story).
I'd rather leave this open in order not to loose / forget about the approaches you looked into already.
Just added it to the Documentation board - we won't forget about this issue ;)
Most helpful comment
Just added it to the Documentation board - we won't forget about this issue ;)