Implement Lazy Load to your images.

A comprehensive repository of Taiwan's data and information.
Post Reply
tongfkymm44
Posts: 217
Joined: Sun Dec 22, 2024 3:36 am

Implement Lazy Load to your images.

Post by tongfkymm44 »

To speed up the initial loading of our website, it is useful to apply a lazy load to our images. This way, the server will not have to deal with the images in the background of our website until the user scrolls to them. Be careful! When you put the images with lazy loading, do not forget to specify the height and width of these, otherwise this will generate a CLS penalty.


Reduce and optimize the JavaScript code on your website.
When we write JavaScript code, it is clear that we have to do it in a readable and clear way, but we cannot overlook optimization either. In addition, it is also useful to minify this file so that it takes up less space, but be careful because this can generate errors or unexpected behavior in our code.

Avoid third-party code.
We've all used third-party code on our websites when we wanted to insert a dynamic chart, forex leads database lists a carousel or a slider, but it's important to keep this type of code to a minimum. These files are usually loaded from servers outside our own, which causes a delay in loading and affects both the CLS and the initial loading of the LCP.

Make your pages more static.
It is clear that nowadays pages are more interactive than ever and this has made the weight of websites increase significantly. Therefore, we must be aware that a high load of JS and CSS will make our website load slower. Animations, mobile blocks and popups are really attractive, but we must find a balance between functionality, design and usability. We have more and more examples of “simple” websites that give very good results because they put usability before aesthetics. Frameworks such as Astro show that you can have a very aesthetic website with a low load of JavaScript.

Use a CDN.
CDNs usually create cache copies of our website on several servers so that when a user wants to access a page, they do so from the closest server and it loads faster. This is a very effective solution and helps considerably with speed. However, these services are usually not free.

Use a cache.
This is one of the most popular solutions, since if we use some kind of CMS like WordPress, we can find free plugins that perform this function correctly. These plugins usually generate a compressed copy of the pages on the server and make loading smoother and faster. It is important that, every time we make a change to our website, we preload this cache again; otherwise, we run the risk of our changes not being reflected on the real website, since the server will continue to show the old cache.
Post Reply