Advertising disclosure

Hosting Canada is community-supported. We may earn a commission when you make a purchase through one of our links. Read Disclosure.

15 Ways to Speed Up Your Website

One of the worst things that can happen to your website is to lose customers over issues that are entirely preventable. Statistics from the 2017 Google Page Load Time study demonstrate that one second can make a big difference in your traffic numbers and customer satisfction.

In just one second:

    • ☑️ Your page views could reduce by 11 percent 😮

 

    • ☑️ Customer satisfaction levels could drop by 16 percent 😮

 

    ☑️ You could experience a 7 percent reduction in conversion rates 😮

Over the course of a year, that one second delay could result in a $2.5 million drop in revenue for businesses that normally average $100,000 in daily sales.

In short, latency is the enemy of website performance and user satisfaction. Fifty-three percent of consumers state that they would leave a website that took more than three seconds to load.

What is Latency and Why is it Important?


image showing network latency and speedThere are three components that contribute to data delivery speed: bandwidth, latency, and throughput.

In conjunction with optimized content and coding, these elements go hand-in-hand. Issues with one will affect the others.

Bandwidth is the pipeline over which your data travels. Narrow bandwidth reduces the amount of information that travels over that pipeline at any given time. This leads to problems with latency and affects throughput.

Website latency is defined as the time it takes for information to make the round trip from browser to server and back to the user again. Throughput is the amount of data that travels over a server in a set time period.

It’s the optimal balance of latency (low) and bandwidth (high) that leads to efficient delivery and better throughput. If that balance is unfavorable, your website page load times will be slower and data delivery delayed.

What contributes to high latency rates?

  • Propagation. This is the length of time needed for data packets to travel from one source to another.
  • Transmission medium. We’ve come a long way since the days of dial up, but the transfer medium still affects latency. Even such technological advances as fiber optics and WAN have physical limitations that affect content delivery speeds.
  • Routers. What we’re able to do with a mouse click or by typing in a URL sets into motion a chain of events that allows us to access the internet. To the eyes of the average user, a request is made and honored at the speed of light. However, it depends on the ability of our router to properly analyze packet headers and other information.

The more distributed the network, the more times a packet has to hop from router to router. This contributes to high latency.

  • Storage. Delays occur each time a packet of data is succeed or stored. The process if further complicated by the number of switches and bridges encountered between the initial browser request and delivery. See related – best cloud storage
  • Formatting How you configure files and manage WordPress databases will affect how instructions and code are read and processed. Clean, lean and elegant code leads to efficiency and speed.
  • File types and sizes. It stands to reason that smaller files and simpler formatting will traverse through a network faster and more efficiently. Websites that are heavy on graphics and other rich media are content appear more cluttered, and it affects how fast pages can load completely. That is why it’s important compress your website files.

The Benefits of Optimizing Your Website


Whether you decide to use a high-quality website builder, hire a web designer, or construct your web page on your own, considering security and speed by design will improve the look and delivery of your content. This aids with SEO optimization and provides a better user experience (UX).

Studies show that it can take up to 22 seconds for a mobile website to fully load the average landing page. Imagine the edge you’ll have over the competition if you can shave your load times to seven seconds or less.

15 Ways You Can Increase Your Web Speed Today


Today’s servers are able to deliver load times that measure in milliseconds rather than seconds. In addition to controlling the technology that delivers your web content to visitors, you can implement a number of changes and tweaks to ensure consistent, fast page loads and a more satisfying overall UX.

Here are 15 ways that you can increase your website speed, and they won’t detract from your content quality or site aesthetics at all.

1. Enable File Compression

File compression is nothing new. We’ve all encountered files that were too big to download that we’re able to access after they’re compressed. The same idea can help your website load faster by using Gzip compression.

In order to perform this by installing the compression plugin for your content management system or manually through the .htaccess file. This will work for CSS, JS, XML, and HTML by adding the following code:

AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript

2. Remove Unnecessary Plugins and Extensions

When you’re first building your website, it’s tempting to install and try a number of plugins, Some of them are great, but many more end up gathering dust in our directories.

Make it a rule to immediately uninstall any old, unnecessary, or unsupported plugins and add-ons or extensions. Disabling them may seem like the easier option, but that can cause security problems and put you at-risk for breaches and exploits.

When it comes to website security focusing on having only the best WordPress plugins installed while removing unnecessary ones is also extremely important.

3. Optimize HTTP

There are two ways that you can improve page load times through HTML optimization. The first is to minimize your HTTP requests. You can accomplish this in several ways:

    • ☑️ Use CSS instead of images whenever possible
    • ☑️ Combine CSS, JS, and HTML files to avoid bloat and redundancy
    • ☑️ Design clean, simple pages with fewer elements
    • ☑️ Enable caching
    ☑️ Reduce the number of redirects by purging old pages and broken links

The second way you can optimize HTML is by enabling Keep-Alive. Normally, each file request initiates a separate action. By enabling HTML Keep-Alive, you’re creating one open connection that stays that way until all browser requests are honored. Simple copy this bit of code into your .htaccess file, surrounded by the appropriate opening and closing tags:

IfModule mod_headers.c
Header set Connection keep-alive
IfModule

You can also check out our guide on how to move Http to Https.

4. Install a Content Delivery Network (CDN)

Content delivery networks (CDNs) reduce page load times in much the same way as servers. These networks are spread around to different points on the globe, allowing someone in that geolocation to access your website closer to home.

Many hosting services include a CDN as part of their service, so check into availability before you sign on with anyone. See relatedbest Canadian CDNs

5. Enable Caching

Caching leaves a copy of your web page on the user’s browser until the page is refreshed and content updated. This means fewer HTTP requests and pages to load. When you enable caching, you can reduce page load times by 1.5 seconds. In an era when every second counts, that amounts to a huge difference.

Caching in WP can be enabled with the Rocket plugin or through one of the free plugins like WP3 Total Cache or Super Cache. Those using HTML can enable caching through Etags, Expire, or other methods. Drupal users can perform cache enabling by following these instructions.

6. Minify JS and CSS Code

You can improve your page load times by reducing the amount of coding it takes to perform an action. Start by creating a separate file for JS and CSS, and then work to reduce white space, delete unnecessary comments, and combine files or command lines wherever possible.

If you’re unsure how to best minimize code without creating other problems, there are minifying tools available that will identify and correct bloated coding.

7. Employ Asynchronous JS and CSS File Loading

Once your code is lean and efficient, you can tweak how the files are loaded to your page through asynchronous loading. This changes how content is loaded onto your page by doing it more efficiently.

You see, most browsers handle requests by loading pages in order, one at a time. This is known as synchronous page loading.

Each time the browser encounters a page that’s synchronous, it halts all other activity until the current page is fully loaded. With asynchronous loading, your browser is able to handle some requests simultaneously, meaning shorter website load times altogether.

Most content management systems have a mechanism to enable asynchronous CSS and JS file loading. For example, WordPress has a “Static Files” tab on their Rocket plugin that will allow you to enable this function by checking the appropriate boxes in the “Render-blocking CSS/JS” section.

Non-WP user can enable this in JS by using the async or defer attribute. For CSS, try writing styles for the first screen in the head of html to enable asynchronous loading of the first page.

Deferred JavaScript loading can produce the same results, and it can be enabled in the same section of the WP Rocket panel as loading preferences. If you’re running a site on HTML, you can defer JS loading by placing a call to the external file just before the body tag on your code like this:

8. Optimize Image Files

One of the biggest resource and database hogs is images. Sure, photos will add to your content, but too many will also affect speed and drive traffic away. If you must include images on your website, choose one or two, reduce their file size and type to something more efficient like .jpeg, or make them into a collage rather than a gallery of separate images.

You could also move them to a platform that’s made for images, like InstaGram, and simple link to that platform from your website.

The same applies to video content, which can be removed to a YouTube channel. Both of these solutions will also help with SEO, as you can optimize them separately by using a combination of alt tags for indexing images and video content and on-page SEO for overall page optimization. One of our favorites is Optimizilla.

9. Disable Hotlinking and Limit Social Media Shares

Speaking of social media and images, you would do well to disable hot links on your webpage and limit social media shares. The second suggestion seems counter to everything you know about social proof, outreach, and engagement, but you can find a balance that will support your social media presence without affecting performance.

This leads us to the problem of hotlinks. Hotlinks are a bit of tech that allows other people to take your content and use it on their own website or social media platform. It also inadvertently increase your resource usage.

Rather than linking to images or content on another website, or allowing your to be stolen, download them and save them on your server. It may seem counterintuitive, but linking to other website content may have the unintended consequence of allowing someone else’s potentially substandard site performance affect your own. We have a whole article on hotlink prevention techniques, you can check it out here.

10. Reduce External Scripts

Adding external scripts vi JS code increases the number of HTTP requests, which decreases website speed. Some external scripts are necessary, so you don’t have to eliminate them completely. Pingdom allows you to test each external link in order to determine which are causing a problem.

Before adding external links to your web content, make sure that the source website is reliable or you could bring their problems home to your platform.

11. Find and Fix Broken Links

Any broken links that end with redirects or error messages can affect the UX. However, this tip refers to links contained within your image, JS, or CSS files. Look for and test links in the heading of your CSS files and in the JavaScript source URL. You can look for them manually, by examining server logs, or by using a link-checking tool.

12. Optimize Your Databases

Bulky file storage definitely contributes to sluggish performance. You want a complete record of every action for security purposes, but each time a plugin or other feature saves data, it builds up in your database. Imagine all of those pingbacks, spammy or unnecessary comments, and post revisions piling up, and you have a good idea of the problem.

database optimization

In order to avoid this issue, perform regular backups followed by purges to get rid of excessive data without suffering unintended consequences.

13. Use Lightweight Themes

You would be amazed at the difference just changing your theme from something clunky and laden with code to a lightweight framework. If your website seems slow and all other elements are fine, try using a newer, lighter theme. This means diving deeper into the performance history of the theme rather than just going for something that looks pretty.

As with plugins, make sure to uninstall the old theme rather than disabling it.

14. Choose a Good Content Management System

Content management systems (CMSs) are critical to maintaining reliable speed and performance. The most popular by far is WordPress, but there are also Joomla, Drupal, and many others. They offer the advantage of content optimization and the availability of performance-enhancing plugins or features.

15. Choose Your Hosting Service With an Eye on Performance

It may be tempting to find a cheap hosting service, After all, your bread and butter is in your platform, right? However, ever optimizing all other components that contribute to efficient performance won’t matter if your hosting platform is substandard.

This means not only choosing a plan that will allow you to handle traffic spikes and growth, but also finding a provider with the technology to support performance. Shared hosting plans are okay if you’re just starting out and use more static content. However, your speed and resource availability is sometimes dependent on having good neighbors.

Whenever possible, opt for a quality virtual private network (VPN) or a dedicated server. This will provide you with the resources, storage, and availability necessary to reduce downtime and latency.

Don’t Forget About Testing and Ongoing Evaluation


Knowing what to tweak and when depends on knowing what issues are affecting page load times and overall content delivery speed. Some hosting services have built in tools that you can use to measure website performance. There are also a number of methods and tools you can use to measure latency and page load times.

No matter which method or tool you use, make sure to test from a variety of locations. It stands to reason that servers located farther away from the source will take longer to deliver content.

Geo-testing from a number of locations will help you gauge latency rates. When conducting speed test, do so both with your CDN enabled and disabled. This will help you evaluate the effectiveness of your CDN and other technology.

how does a cdn work

One of the most common and effective speed testing tools is Pingdom. This free online tool is an easy way to determine a range of issue with website performance and speed.

You just enter your URL and server location into the search box and hit “Start Test”. You can also purchase a premium subscription for more in-depth testing of uptime and content types from more than 70 server locations.

This is an example of a ping test using Google’s public DNS:

$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: icmp_seq=0 ttl=56 time=54.524 ms
64 bytes from 8.8.8.8: icmp_seq=1 ttl=56 time=43.423 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=56 time=50.773 ms

A traceroute tool will trace the packet journey from server to server, measuring the route from browser to host and identifying any bottlenecks or other issues.

Here is an example of the traceroute command report using the same Google DNS:

$ traceroute 8.8.8.8
traceroute to 8.8.8.8 (8.8.8.8), 64 hops max, 52 byte packets
1 192.168.0.1 (192.168.0.1) 6.632 ms 9.659 ms 10.089 ms
2 10.89.0.1 (10.89.0.1) 29.867 ms 14.293 ms 30.259 ms
3 blk-212-126-117.eastlink.ca (173.212.126.117) 20.677 ms 19.575 ms 20.155 ms
4 ns-hlfx-dr002.ns.eastlink.ca (24.215.102.161) 30.093 ms 29.371 ms 30.796 ms
5 ns-hlfx-br002.ns.eastlink.ca (24.215.102.221) 29.540 ms 29.516 ms 29.989 ms
6 ns-hlfx-br001.ns.eastlink.ca (24.215.102.9) 26.678 ms 29.203 ms 30.787 ms
7 google.eastlink.ca (24.215.101.10) 49.027 ms 49.196 ms 90.601 ms
8 209.85.241.127 (209.85.241.127) 49.999 ms
72.14.239.75 (72.14.239.75) 48.939 ms
72.14.235.169 (72.14.235.169) 46.823 ms
9 google-public-dns-a.google.com (8.8.8.8) 49.465 ms 45.436 ms 43.772 ms

Speaking of Google, they also have a free tool to test websites for speed and performance issues. You can access their PageSpeed Insights here.

Testing isn’t a one-time operation. Your website should be monitored around the clock using automation and some of the available tools for performance and speed testing. in order for the results to have any meaning. This will help you identify any issues before they become costly problems.

Final Thoughts


As networks become more crowded and distributed, latency becomes more likely. Our goal is to provide you with the information you need to improve your website performance and speed.

In addition to choosing the best web hosting service for your needs and budget, optimizing your content and how it’s delivered will go a long way toward eliminating many of the causes of downtime and slow performance.