Statistics show that 45-50% of users stay on a website for 10-20 seconds when they are looking for something, and if they don't find what they are looking for, they close the page and go to another site. If you don't want to lose potential business from a user on your webpage, you need to make those few seconds count. This is why page load time is crucial for any website.
There are a lot of factors that can help decrease your webpage's load time. Here are five that can have a big impact, as well as some tools that you can use to analyze the performance of your websites.
Decrease image size. Optimize your images. For example, if you support three layouts (mobile, tablet, desktop), try to have three different images with different sizes and load the correct one through CSS and media queries (you can read more about media queries in this article). JPEG images (or with a .jpeg extension) with an 80% compression rate are optimal, with images that still look nice but with a smaller size for faster page loads.
Improve the server's response time. The aim would be to get the response time for each HTTP request under 200ms-250ms. If the response from the server takes around one second or more, you need to analyze. Delays could either be caused by a backend code that needs optimization (it may need to be broken down into multiple requests, which have faster response time), or a big geographical distance between the user and a server.
Geographical distance is a major factor. If, for example, the user is in Mumbai and you are hosting your website somewhere in Dallas, the round trip from client to server and from the server to the client in this case can be significant (even 500ms). To resolve these geographical issues, many hosting providers offer the possibility to deploy your website (or Web application) in multiple regions (North America, Asia, Europe). If you need to have a fast response time for your webpage all around the globe, this can be a good option. Please note thatthis can lead to different synchronization problems, depending on your Web application's logic.
You can use Google's PageSpeed to test your website's loading speed. It also offers hints on how to fix the issues. Inside Chrome, you can use the Chrome Developer Tools to see how much time it takes to load each of the resources, and it offers a nice time-based interface view that shows the load flow.
You can read more about optimizing and increasing webpage performance at the Google Developers website. Check out the Optimizing Performance section and Mozilla's Tips for fast-loading HTML Pages.