Performance

Why do some web pages take longer to load than others?

Page size

Everything on the page you request has to be sent to you, and then your device needs to render it. A page with a single word will take up less data space than an entire novel on a web page. Therefore it would take less time for the server to send you the content and your device spends less time rendering it.

If you need to display a whole novel on the page you can’t remove some of the content. But when dealing with websites you have other factors at work.

Is every image on the website at the optimal size? There’s no point storing an 8k resolution image for a site that locks the width at 2000 pixels. That high res image could take 10Mb when 1Mb would be enough. Even if your site doesn’t lock the width can you use source tags to load the appropriate image based on the resolution of the device being used to view it?

What about javascript? Are you including whole 3rd party libraries when you only use a couple of features? If you are building a site for a client and they want lots of tracking scripts for analytics put on the website then check that these are as small as they can be.

File formats

File data is stored in different formats. These formats simply represent how the pure data has been manipulated to save file size while still conveying the content. A .jpg image and .png image might look the same but take up different amounts of file size. The size varies based on how well a format can compress the original data into a smaller size for transmission.

A smaller file might not always be the best choice if it requires the client application to carry out a memory intensive decompression before the file can be used.

Bandwidth

Bandwidth is a measure of how much data can be transmitted over a network connection in a given time period. You will often see it measured in bits per second (bps). The lower the bandwidth, the slower the page loads.

Local Area Networks usually have high bandwidths in the gigabits per second.

Dial Up modems or satellite links are low bandwidth connections often measuring in kilobits per second.

Most users now have access to ADSL connections from their homes or business. These measure in megabits per second.

Network

Unless you are building an intranet that is hosted within the same building as the workers then the traffic between the client (the user looking at the website) and the server (the computer sending back the code and any files) will pass through a network of routers and possibly servers. Any one of these could be having issues outside of your control. Or even if everything is working correctly there is a distance involved. If the server you are connecting to is on the other side of the planet then it will serve pages slower than one nearby in the same country. This is why multinational companies will often use a Content Delivery Network (CDN) to serve up their websites. These are collections of servers throughout the world that will cache either the pages or files like images and videos. When you request a web page the CDN server closest to you will return the page. Someone in a different country going to the exact same webpage will be served content from a different node in the CDN.

Optimisation

If your website is getting the content from another system such as a database or API there is always the possibility that that system is poorly optimised or has insufficient resources to handle all the requests.

This could mean that you query a database for content and either the database isn’t correctly indexed or it is poorly designed and you are having to run multiple queries to get the data that you need.

Report a Glow concern
Cookie policy  Privacy policy

Glow Blogs uses cookies to enhance your experience on our service. By using this service or closing this message you consent to our use of those cookies. Please read our Cookie Policy.