On the Internet nothing causes people as much grief, anger and aggravation as a slow loading website.
If a website does not load within the critical first 2 seconds 50% of viewers will click or tap away and most of them won’t return. This means lower conversion rates, lower rankings on searches and anemic traffic.
And this rule is not only applicable for small websites. Google saw a drop of 20% traffic because a page loaded half a second slower. Amazon experienced substantial revenue losses because page load speed increased by 100 milliseconds.
So how do you make your website load super fast? Get started with these recommendations :
1. Sign up with a good web host
Don’t skimp on this part. While signing up with a web host with budget plans (think a dollar or three per month) might be tempting it’s kind of like wanting to cross the North Atlantic in 24 hours in a sailboat. Check out this guide before signing the cheque.
Uncompressed images on your website are a sure way of ensuring that your site will feel sluggish while loading. For web graphics, use GIFs or PNGs over JPGs. If you do have to use JPGs (for example, a photograph) use image editors to resize the image. Also specify image dimensions to help the browser wrap the non visual elements during initial loading.
3. Minify code
Use minified stylesheets, HTML and JS. Removing comments, spaces and tabs will gain you a few kbs per file. Doesn’t seem like much but in page load optimisation, every kb counts.
4. Optimise code
Lazy load images, CSS and JS. Arrange external JS and CSS so that they are loaded later, or combine several CSS and JS files into one. Configure your server so that everything is compressed (the GZIP compression algorithm cuts down size by almost 70%). Parallelised download of files from cookieless domains can also decrease loading times.
5. Use free tools
6. Use a CDN
When you host your site on a good CDN (content delivery network) your static assets are hosted in different data centres spread across the globe. A browser located in London won’t have to send server requests to a distant data centre in Seattle- it will send them to a data centre nearer, maybe in London or Paris. That means faster loading times, almost 100% uptime and reduced bandwidth usage.
7. Use a font delivery network
Fonts on your site take up a lot of space and delivering them, especially the ones that are not very common, can be a design challenge. You can use a third party cloud service like Typekit to serve your fonts to readers without slowing load times.
8. Minimize redirects and remove broken links
Every time a browser encounters a 301 or 302 redirect valuable time is lost and user experience degrades. Google has a set of recommendations on when redirects should be used- follow them.
404 or 410 requests are also a waste of time and can cause the reader to click away. Use a free tool like Online Broken Link Checker to check your site for broken links.
9. Cut down on DNS lookups
A browser needs to complete a DNS lookup to know the IP address of the hosted files. Repeated lookups delay load times as the browser can’t do anything else. Use fewer hostnames to host resources- the optimal number is between 1 and 5 (1 main host and 4 hosts for parallel downloads).
10. Speed up for mobile
Compared to desktop devices, mobile devices have lower CPU speeds and have to often work on slow data networks. Minimise the amount of JS that’s needed to render the page and delay parsing the unneeded JS until it has to be executed.
If you are redirecting visitors to a mobile specific landing page - for example www.mysite.com to m.mysite.com - make the redirect cacheable to speed up loading times for repeat visitors.
Since your website is a living, growing entity you will have a full time job tweaking the back end to improve the performance and load speed. While these 10 tips are by no means exhaustive or comprehensive implementing them will result in significant time savings.
Do you have other tricks for improving website performance?