How to Speed Up Website Loading Pages


Although the back end is very reliable and the front end page is very interesting, but if the load time of the page is slow, we can be sure the user will be very uncomfortable and then leave our website.

INPHEDIA.ID - The challenge as a web developer today is not only to build a reliable back end or front end that is responsive to design and user friendly, but also ensures that the pages accessed by users are loaded correctly and quickly by the web browser.

Although the back end is very reliable and the front end page is very interesting, but if the load time of the page is slow, we can be sure the user will be very uncomfortable and then leave our website.

The speed of the website certainly also affects SEO. Website speed indicators are taken by Google for website ranking. The slower our website, the more slowly it sinks in the Google search engine.

Well, to speed up this website there are several ways that can be done, including using cache, checking code again, adding header expires in static resources, script minification, image optimization, using lazy loading mechanisms for images, combining external scripts and using CDN for static resource.

Cache is a powerful way to speed up website loading. The first cache model is to put the cache on the client device, for example for static resources (JS, CSS, images).

The second way is to put the render results from a page on the server, meaning that when a user opens a page that has been opened before. The server does not need to execute the code from the beginning to the end, the user only opens the render results from the previous user.

Add expires header in static resource
Add the http expires header or cache control in each static resource file (images, css, js, etc.) that intends to put the file on the user's device within a certain period of time. So when a user accesses our website again, the web browser does not need to load resources from the server and only retrieve it from the cache.

Image optimization
Image content usually will have a large size in total compared to other resources. Image optimization can be done by making sure the image size is as requested, for example, you don't need to use 1600px X 800px image size for 100px X 100px thumbnail images.

Optimization is done by reducing the size of the image without ignoring its quality. This can be done with a variety of image editing tools, both online and installed on a PC / laptop.

Use the lazy loading mechanism for images

Lazy loading is a general design pattern used in computer programming to delay object initialization to the point where it is needed. This can contribute to efficiency in program operations if properly and correctly used.

For example, an image located in the footer will not be loaded by a web browser when the website page is first opened. This image will only be loaded if the user scrolls the page down to the footer section.

Re-check coding
To ensure that the coding we use runs optimally, make sure all the coding works if it can be summarized and nothing is not used. For example, query optimization in the database, avoid using many variables, avoid loading libraries that are not needed, including libraries loaded from external links. Likewise if we use external resources, make sure there are no broken links.

Minification script
Remove all unnecessary characters from the source code without changing their function. These include white space characters, newline characters, comments, and sometimes block delimiting, which are used to add readings to the code but are not needed for it to execute.

Combine external script

Sometimes we use a lot of css files and lots of js files. Try to combine css files into 1 file as well as for javascript files. So the web browser only needs to request 1 time for css or javascript.

Use a CDN for static resources
You certainly have to pay to use a CDN. But the impact you will get will be very large. CDN is a distributed server system that provides web pages and other web content to users based on the geographical location of the user, the origin of the web page and the content delivery server.

This service is effective in accelerating content delivery from sites with high traffic and websites that have global reach. The closer the CDN server is to the user geographically, the faster the content will be sent to the user.

To measure speed and website optimization, there are a number of tools that can be used to see how well we are optimizing. To know the speed of the website, you can use tools, such as Lighthouse, WebPageTest, PageSpeed ​​Insights and GTmetrix. You can search all four of these tools in the Google browser. (INT.IND/ENG/*)

Buka Komentar
Tutup Komentar
No comments:
Write comment

Siapapun boleh berkomentar, tetapi secara bijaksana dan bertanggung jawab. Berkomentar dengan UNKNOWN atau SPAM akan dihapus. Komentar sepenuhnya menjadi tanggung jawab individu komentator seperti yang diatur dalam UU ITE (Undang-Undang Informasi dan Transaksi Elektronik) maupun perundang-undangan yang berlaku.


Back to Top