Hello to the best customers in the world ! I hope you are having a great week!
Let’s get into the first great news :
We had a very beneficial conversation in this topic and, as a result, we’ve implemented a new feature
Shout out to @user552 @Charlie and @Hugh for the great ideas and participation in the development of our company!
Guys, never hesitate to share your ideas with us — we’re open to discussions and are always happy to talk!
On a positive note, I guess it’s time we dived into the details
New lazy loading feature
We’ve implemented a new lazy loading feature, which will help you significantly improve Google Page Speed Score of the page where the widget is installed.
You can think: “What is the difference between the new and the old one?”
This new method makes the widget load only when a visitor interacts with the page’s content or scrolls down to the place where the widget is installed. Thereby, the widget is not loaded straight away, so the page speed performance shouldn’t be affected.
Please keep in mind, that the code will work correctly if it is not installed in the initial viewport, i.e. users have to scroll down at least for a little bit before they reach the widget.
When you assure that the code is installed in the right place, you can start creating code for lazy loading.
How to do it?
To do it, you just need to add the “data-elfsight-app-lazy ” attribute to the <div>
element of your installation code.
For example, here’s what the installation code looks like initially:
script src="https://apps.elfsight.com/p/platform.js" defer></script>
<div class="elfsight-app-9d3beb9e-4c72-4bd1-8ed6-c192fc9e56c7"></div>
And here’s what it should look like with the attribute added:
<script src="https://apps.elfsight.com/p/platform.js" defer></script>
<div class="elfsight-app-9d3beb9e-4c72-4bd1-8ed6-c192fc9e56c7" data-elfsight-app-lazy></div>
Your code is ready! Now you should add this code to your website and the PageSpeed score will become much better.
Please like this post if you think that the new feature is cool. That will encourage us to scale new heights and grow much faster