Shivashish Thakur is a Computer Science Engineer, Data Science Enthusiast and a blogger.
Improving the speed of your website is important for better users experience and also for higher search engine rankings. Google announced that they are now including website speed in their search ranking algorithms.
Now you need to monitor how your website is loading and figure out why it’s loading slowly if it is. The following are some tips for decreasing your web page loading times.
1. Check the Current Speed of the Website
The first thing you will want to do is to analyze your current page speed. This allows you to track your improvement and ensure that any changes you make positively improves your page load times.
There are many free tools out there for checking how long it takes to load your website. Here are a few of them:
2. Optimize Your Images
Know when to use the appropriate file format for your images. Changing to a different file format can dramatically decrease the file size of an image.
3. Don’t Scale Down Images
Avoid using a larger image than you need just because you can set the width and height attributes of <img> elements in HTML.
If you need a 100x100px image and you have a 700x700px image, use an image editor like Photoshop or one of these web-based image editors to resize the image to the needed dimensions. This lowers the file size of the image, thus helping to decrease page loading times.
If you want a really fast and feature rich website you can also go for a Custom Website Development.
4. Compress and Optimize Your Content
5. Put Stylesheet References at the Top
Moving your stylesheet references to the <head> of your HTML document helps your pages feel like it is loading faster because doing so allows your pages to render the styles progressively. In addition, it doesn’t hurt that it’s the W3C standard.
6. Put Script References at the Bottom
Browsers can only download two components per hostname at the same time. If you add your scripts towards the top, it would block anything else below it on the initial loading of the page. This makes it feel like the page is loading slower.
To avoid this situation, place script references as far down the HTML document as possible, preferably right before the closing <body> tag.
8. Minimize HTTP Requests
When visiting a new web page, most of the page-loading time is spent downloading components of that page (e.g. images, stylesheets, and scripts).
By minimizing the number of requests a web page needs to make, it will load faster. To reduce HTTP requests for images, one thing you can do is to use CSS sprites to combine multiple images.
9. Cache Your Web Pages
If you use a content management system that dynamically generates your web pages, you should statically cache your web pages and database queries so that you can decrease the strain on your server as well as speed up page rendering times.
When you cache your page, it saves a static version of it to be presented to the user instead of recreating it every time it’s requested.
For WordPress, check out WP Super Cache and W3 Total Cache (also read this WordPress codex entry on optimizing/caching WordPress). Drupal core has native caching.
10. Reduce 301 Redirects
Every time a 301 redirect is used, it forces the browser to a new URL which increases page-loading times. If possible, avoid using 301 redirects.
Web page speed is a metric that should not be ignored if you are concerned about providing an optimal user experience. You should be baselining this now and then referencing your baseline to make sure it is constantly improving. You can do this through a custom report. These tips are generic but can help your site speed whether you are a boat dealer or a restaurant, so you should find use in them.
Create your free account to unlock your custom reading experience.