How to Speed up Your Website

posted 4 months ago

What are the benefits of speeding up a website?

As a website owner, the impact of your website speed on traffic, conversions and revenue should not be underestimated; research conducted by Akamai found that 47% of people expect a web page to load in less than two seconds, and that 40% of people will abandon a web page if it takes more than three seconds to load.

A 2010 study by Gomez, titled “Why Web Performance Matters: Is Your Site Driving Customers Away?”, that interviewed 1,500 consumers about how website performance impacts their shopping experience, revealed the following insights:

  • An increase in website loading time from 2 to 10 seconds increased page abandonment rate by 38%.
  • During peak traffic periods, more than 75% of consumers left for a competitor’s website instead of suffering a delay.

Many other studies have been published on the impact of website speed, and a study by Aberdeen Group found that a one second delay in site loading time resulted in a 7% decrease in conversions, an 11% decrease in pageviews and a 16% decrease in customer satisfaction. It’s also important to note that Google now uses website speed as a ranking factor.

In a nutshell, having a slow website will negatively impact the following:

  • Traffic and page views
  • Conversions
  • Sales
  • Brand image and perception in the mind of your visitors

Since it’s my goal to make the premier resource on building successful websites, I’ve decided to prepare a guide on how to boost your website speed. Below are 21 ways to increase your website speed:

1. Remove Unnecessary Plugins and Add-ons

Unnecessary plugins and add-ons can reduce your website speed by A LOT, and it’s especially important to pay attention to them if you use blogging CMSs like WordPress or Drupal.

A good case study about the impact plugins can have on a website’s speed is this one by Mike in which he reveals how he was able to take his website speed from 4.23 seconds to 1.33 seconds; while analysing his website to see what was slowing things down, Mike realised that plugins contributed to a whopping 86% of his website load time.

It’s very important to note that it’s not just about the number of plugins you have installed on your website but about the quality as well; a website with 50 plugins can load much faster than a website with 10 plugins if the website with fewer plugins have crappy plugins; generally, you want to avoid plugins that load a lot of scripts and styles, plugins that perform lots of remote requests and plugins that add extra database queries to every page on your website.

Indeed, plugins help enhance your website’s functionality but it is also important to only use a plugin if you’re convinced that it is absolutely necessary.

If you’re a WordPress user, you might want to install the P3 (Plugin Performance Profiler);

This plugin will scan all of your WordPress plugins to find the bottlenecks, and it’ll give you a report so that you can see how each plugin affects your website performance.

2. Significantly Limit, or Remove, Social Sharing Buttons on Your Website

If you believe that you need to have 100 social sharing buttons on your website, think again; it’s hard to pinpoint research that establishes a massive boost in website traffic due to having social sharing buttons (if anything, too many social sharing buttons will confuse your readers), but research shows that a slow website does reduce traffic.

Most social sharing buttons use JavaScript, and this can be very troublesome when it comes to performance; there have been repeated cases of a Facebook, or some other social media site, outage that significantly impacts the website speed of people who installed their share buttons.

The solution to this is to either limit/remove social sharing buttons, or to configure them to load asynchronously so that an outage of a particular social media site won’t slow down your website.

3. Load Analytics and Ad Networks Code Asynchronously

Analytics tracking codes and ad networks’ codes can also significantly impede your website speed, especially if the remote server is slow or down; you can easily prevent this problem by configuring all of your tracking codes to use asynchronous delivery; this way, a server outage or delay with your Ad network or analytics service won’t slow down your website.

4. Enable Expires Headers

There are several factors that influence how fast a website is, but the server response time contributes a great deal to site speed; the more requests are being made to your server, the slower it’ll take your website to load.

Expires Headers tell your visitor’s browser when to request certain files from your server vs. from their browser cache; if an Expires Headers is configured so that your visitor’s browser only request a file once in a month, and that file has been stored in their cache from a recent visit, then their browser won’t request that file again until a month is over. This is like a double-edged sword for boosting site speed because it limits the number of HTTP requests on your server and at the same time reduces load on your server since the same file won’t be requested repeatedly.

If you want to implement Expires Headers on your website, this tutorial by GTmetrix shows you how to do just that.

5. Enable Caching

Caching ensures a much faster experience for your website users by storing a version of your website on their browser and serving them that version until your website is updated or until you instruct it to refresh the version of your website they are served.

Enabling caching for your website can boost its speed significantly, and research shows that enabling a full cache for a website can reduce the website loading time from 2.4 seconds to 0.9 seconds; now, that’s massive!

There are different ways to enable website caching depending on what platform you are using; for WordPress, you can install the following plugins:

If you want something more advanced, go ahead and buy WP Rocket (it’s probably the best!). For Drupal, you can follow this resource.

Here are more tutorials on how to enable caching for your website:

6. Use a Content Delivery Network (CDN)

Most sites are hosted on servers in the US, and while these websites will generally be faster for people in the US or people visiting with a US VPN, your website will be a slower for people from other parts of the world. A CDN solves this problem by distributing your website files across a network of servers in different locations of the world, so that someone trying to visit from India will get served from a server in Asia instead of from a server in Europe. This will lead to significant increase in your website speed.

To determine how effective CDNs can be, Matthew Woodward conducted an experiment and found that using a CDN can increase website speed by up to 60%.

Here are some of the best CDN options for you:

  • Cloudflare (their free plan is good enough!)
  • MaxCDN (pretty expensive, but worth it)

7. Get a Better Web Host

If everything you’re doing to make your website faster isn’t working, or you’re only noticing little, insignificant difference in site speed from following best practices, perhaps it’s time to change your web host.

In an article for Smashing Magazine, Marcus Taylor revealed how the web host that was being used impacted the site speed of two of his clients; both clients have similar websites but a different hosting provider. One of the clients hosts on a reliable dedicated server while the other hosts on a cheap server, the result was a massive difference in site response time; the DNS response time of the client on the dedicated server was 7 milliseconds while the response time of the client on the cheap server was 250 milliseconds. No tweak or plugin can remedy such a difference!

Your web host is very important when it comes to your website speed, so choose something good from our hosting reviews here. Alternatively, you can use this article to do some due diligence.

8. Your Website Theme

Exactly how much of an impact does your website theme have on site speed? A lot! Julian Fernandes was able to take his website load time from 630ms to 172ms just by switching themes; this was the same site, with the same host, and nothing else was changed but the website theme, and this resulted in a massive boost in site loading time.

Even the best server configuration won’t save your site if you use a crappy theme with bloated code; make sure you also consider performance when looking for a website theme, not just aesthetics.

9. Install Google PageSpeed on Your Server

The PageSpeed module is an open source server module from Google that automatically optimizes your website speed; it makes modifications to your server and files, following website performance best practices, without requiring you to do anything else.

If you’re tech savvy, you can install Google PageSpeed yourself. If you’re not tech savvy, you can ask your web host/developers to install it for you.

10. Optimize and Reduce Image Size

Un-optimized images can be very heavy, and as a result use a lot of server resources and take longer to load; if the average image size on your website is 1mb or 2mb+, you’ve got serious work to do. You can significantly reduce the size of your image while ensuring that its quality is not negatively impacted by making use of the following tools:

11. Enable Gzip Compression

You’ve probably tried compressing a file on your computer and you’ve seen what a massive reduction in size this can result in; a 60mb file can be compressed to just 5mb. Gzip compression works in the same way, but for websites; Gzip automatically compresses your website files into zip files, drastically reducing the size of your files and increasing your site speed as a result.

In the Smashing Magazine article we referenced earlier, a site went from being 68KB to 13KB solely due to Gzip being enabled.

If you want to enable Gzip compression on your website, this guide by GTmetrix is a good place to start.

12. Regularly Optimize Your Database

This is an often ignored but very powerful way to boost your website speed; it is especially effective if you use WordPress or any CMS that rely heavily on database usage.

Some CMSs, and the plugins you install, rely a lot on your database to save data; this increases data stored in your database as you use the CMS/plugin, making your website gradually slower. This especially applies to plugins that save logs, statistics and user data. It also applies if you use WordPress and enable post revisions, pingbacks and trackbacks.

You can make your website much faster by regularly cleaning up your database, a process that can be automated with the WP-Optimize plugin if you use WordPress, or manually (for other platforms) by following this tutorial.

13. Minify Javascript and CSS Files

If your website uses a lot of JavaScript and CSS files, there’s a high likelihood that your site is telling your visitor’s browser to treat these files individually; this leads to a lot of requests that eventually impacts your site speed negatively. Minifying JavaScript and CSS files reduces the number of individual JavaScript and CSS files, by having them in one place, thus significantly improving your website speed.

14. Combine Your Background Images into Image Sprites

The more requests a user’s browser has to make to your server, the slower your website will be for that user; most website templates are made up of multiple background images, and this ends up creating several different requests whenever visitor’s try to load the website. The solution to this is to combine those images into one, so that a visitor’s browser only has to request one image when trying to load your website; this can be achieved with image Sprites.

By combining background images into image sprites, you’ll be able to reduce request overhead, the number of bytes your visitor’s browser downloads and delay caused by roundtrips made when your server is downloading other resources. This will lead to a much faster website.

You can use SpriteMe to combine your images into sprites, or you can follow the suggestions in this Smashing Magazine article.

15. Enable HTTP Keep-Alive

Usually, when a visitor’s web browser tries to request a file from your web server, it will grab each file individually; in other words, a connection closes when a file has been grabbed, and then reopens to request a new file. This uses more processor, network and memory and eventually leads to a slower website if there’s a lot of load on your server. Enabling HTTP keep-alive ensures that all file requests to your server will be made via a single open connection, leading to a much faster website for your users by limiting the number of connections to your server.

You can enable keep-alive by copying and pasting the code below into your .htaccess file:

Header set Connection keep-alive

Alternatively, you can follow the instructions here or here depending on your server.

16. Fix All Broken Links on Your Website

While broken links inside your content won’t affect your website speed, although they can make for a bad user experience, broken links in your JavaScript, CSS and Image URLs can make your website irritatingly slower; be sure to scan these aspects of your website for broken links and fix them before they send your users away.

17. Avoid Image Hotlinking

Image hotlinking, also known as “inline linking” is the act of linking to an image on another person’s website, instead of loading the image on your own server. On the surface, this seems like an act that will save you a lot of bandwidth, especially if you have a high-traffic site, but it can actually make your website really slow if the website that hosts the image you hotlinked is experiencing a downtime or is slow.

Whether it is images inside your content, or banner images for your ads, be sure to first host your images on your website before linking to them.

18. Limit the Number of External Requests

To ensure a fully functional website, you have to rely on files and resources from other websites; as a result, you have to embed videos, presentations and other multimedia files. While this isn’t necessarily bad, if it’s too much or if you’re requesting external files from slow websites, it can have an impact on your site load time.

Try to limit the number of external requests your website will make; if possible, host as many files as you can on your server. For other files, only let your website request them from very reliable websites.

19. Use a Reliable CMS

Your CMS is the framework of your website; if you use simple HTML or popular and reliable CMSs like WordPress or Drupal you should be fine. If, however, you’re using a less popular CMS or something you built for yourself, you risk having a slow website; make sure you run appropriate tests and do the right research to ensure that a CMS is fast and reliable before using it.

20. Use a PHP Accelerator

PHP reduces the need to keep entering the same information on your website all the time but it can add to your website loading time. You can either try replacing PHP files with static HTML files when possible, or you can use a PHP accelerator to make your website much faster if it relies a lot on PHP.

This Wikipedia entry includes a list of several PHP accelerators you can use.

21. Prevent Others from Hotlinking Your Images

Just as it is important to avoid hotlinking other people’s images, you should also prevent others from hotlinking your own images.

When people hotlink your images, they are basically stealing your bandwidth since a request will be made to your server every time their readers tries to view the images on their website. You can prevent this by disabling hotlinking of images hosted on your server.

This article on Hongkiat will teach you how to prevent hotlinking of your images, and this tool will help you automatically generate an .htaccess file that prevents your images from being hotlinked.

Your Turn – Test Your Website Speed

After implementing the above suggestions, you should go ahead and test your website speed to see if there’s a difference (leave a comment below if you see difference :). Here are my top recommendations for testing your website speed:

Pingdom Website Speed Test: With this tool, you should aim to get a reduced site load time as well as a reduced number server requests. This tool also compares your website speed to other websites online.

GTMetrix: This tool analyzes your website speed using Google Pagespeed Insights and Yslow and gives you a rating from A to F. It also offers suggestions for improvement.

Webpage Analyzer: This tool gives you information on your page size and website download time, and it offers suggestions on how to improve your site load time.

Google Pagespeed Insights: You should aim towards a score closer to 100. It also has a mobile speed test tool that you can use.

Yslow: This tool analyzes your website speed based on Yahoo!’s rules for website performance.

WebPage Test: The closer your score is to 100, the faster your website is.

See also:

How to Speed up Your Website


We like to read the latest tech news, so we post it here for you to read!


These Clever Gmail Hacks Will Stop Spam from Sites Who Sell Your Email Address


I rarely receive spam mail, but every now and then I'll get an email from Cat Fancy Magazine. I've never read an issue of Cat Fancy Magazine or been to their website. Actually, I'm allergic to cats. So how did they manage to get my information? Well, anytime you register for a website's services, you run the risk of having your email address shared with a third party, which may or Read More

Dropbox Alternatives for Agencies and How to Migrate


For nearly a decade, Dropbox has helped media companies and creative agencies collaborate on their projects with greater efficiency. While many have embraced the benefits the service offers, enough time has passed for teams to realize that Dropbox is not tailored to everyone’s needs. Specifically, agencies that work extensively with video have found that slow upload speeds, poor playback qua Read More

How long do hard drives last for?


Hard drive failure is unpredictable, so answering the question of how long hard drives last will inherently comes with a lot of caveats. Short answer: That being said, if you just want a quick rule of thumb for how long you can expect the hard drive in your laptop should last, we’d say you should be prepared for disk failure after three years of use. Long answer: A hand Read More

The 10 Biggest Misconceptions About Remote Work


Remote work is on the rise. Believe it or not, employees are opting for 30 more minutes of shut eye over 30 minutes in traffic. Turns out they prefer home cooked meals at a kitchen table over microwaved frozen meals in the breakroom. They’re also choosing impactful co-worker collaboration over water cooler gossip. In short, remote work is working. According to a 2015 Gallup poll, 37% o Read More


For SEO, links are even more important than you think


It's a rare business today that doesn't take at least some steps to optimize its website for search-engine rankings, but how best to do that remains an open question. A new study published Wednesday suggests that inbound links -- those leading from other websites into your own -- are even more critical than you may think. IT moves to open workspaces, but not everyone is happy In an effor Read More

5 front end optimization habits of highly effective developers


1. Add the CSS in the head, and place the JavaScript in the body. From the user’s perspective, the sole consideration is that she sees something meaningful on the page in a relatively short time span. That means, we need to shift our focus to page render time and invest effort in reducing the time to first paint. A typical HTML page developed today might look like this: Resources have b Read More

KM - Get Randomly ordered records with pagination


Using MSSQL as a database engine to get a randomly ordered results to display you would use: Select [column_name] from table_name order by NEWID(); This statement is a quick solutoin to get random records. The problem for pagination is that you want to preserve the randomness of the records while paging so as not to get repeat results. the solution is to use Select [column_name], Read More

IIS image upload for Wordpress


Issue "I am using IIS7 and wordpress 3.1 I noticed that even though IUSR had permissions on my uploads folder they weren’t propagating to the newly uploaded files. The other thing I noticed was that when a new image was uploaded the Owner of the new file was IUSR, and instead of giving IUSR the permissions that I had assigned for the parent folder it seemed to copy the permissions fro Read More

The Correct Permissions for WordPress on IIS


Quoted Issue "Hi all, We've been running WordPress on IIS for many of our clients for around a year now. While Web Platform Installer for IIS installs WordPress for you very successfully and runs perfectly fine the one thing I found it does not do is set permissions correctly for folders, including the wp-content/uploads folder. I have to go in change permissions for wp-content so that Read More