How does lazy loading scripts work?

You are here:
Estimated reading time: 1 min
Lazy loading scripts mean a javascript will be loaded only after the page was fully loaded and the user made a mouse move or touch event. You can lazy load any scripts, you can specify full file path or just a part of the file name.
You shouldn’t delay scripts that are used for rendering the layout (eg full width row for Visual Composer).
You should also check Async Execute, which is a newer feature, and it will speed up the rendering without lazy loading scripts. If you have one huge javascript file, your first javascript can run only if the whole file was downloaded. With this option you can execute merged javascript files asynchronously, so it will be still only one request, however as soon a chunk was received, it will be executed immediately (while the script is still loading).
Was this article helpful?
Dislike 0 0 of 0 found this article helpful.
Views: 231