Slow websites are not only annoying, but by not fixing your speed issues you'll be losing lots of potential customers. Luckily, there are a number of simple steps you can take to speed up your site:
First Test Your Website Speed
Your website might be loading fine on your high end broadband, but other visitors won't have such fast connections. That's why it's essential to test your site. Also, it allows you to compare the before and after results when making changes.
On the results page the key thing you'll want to look at is the 'Page Load Time'. Secondary to this are the 'PageSpeed' and 'YSlow' scores which will list a of bunch of recommendations (some of which are quite technical to understand). Instead of geting lost in the technical details, focus on solving the main common problems that I've listed below.
Optimize Your Images
The main two main methods for optimizing images are:
A) Resize your images
B) Compress your images
A) Resize Your Images
Let's say someone takes a photo using their digital camera or phone. This produces a very large image with a resolution that is 1600 pixels by 2400 pixels. They upload this image and decide to place it on their homepage. But when placing the image on their homepage they only want a small version of the image that is 200 pixels by 300 pixels. The code might look something like this:
<img src="https://www.examples.com/homepage-image.jpg" style="width:200px; height:300px" />
So they think the image is resized, small and good to go. But the problem is that the code works by first downloading the original image (which in this case is 1600px by 2400px) and then after it has downloaded the large version of the image it then resizes it to 200px by 300px. This could be a whole megabyte or two in file size difference, which on slow connections could add an extra second or two to the loading of a website. Multiply this by many images and you'll see why unresized images on websites can take a long time to load.
One method is to resize the image before you upload it onto your website. Use a photo editing program such as Photoshop or the free alternative Gimp or even Microsoft paint. Load the file into the photo editing program, resize the image to the pixel size that it is going to be on the website and then save the file using a new name (it's important here to use a new file name as you don't want to overwrite the bigger image file in case you need to use it later on in a larger image). Then simply upload your new image onto your website, changing or replacing any old images (however, for even more image optimization you'll want to use the compression techniques listed below).
B) Compress Your Images
There are two options when compressing your image file:
-The 'Lossless' option allows you to compress a file without any loss in image quality at all - choose this option if image quality is most important.
-The 'Lossy' option means you'll lose a small amount of image quality, but it'll give you even greater file size savings - choose this option when website speed is most important.
With your chosen option selected, simply upload the file and allow Kraken to work it's magic. You can then download the file and then reupload it to your website.
Once you've resized and compressed all of the images on your website, then you should see major speed improvements as this is usually the main cause of slow websites.
If this all seems a bit too much, you're not a coder and you're working with the WordPress platform then consider trying plugins such as EWWW Image Optimizer which can automatically do this for you.
Use a content delivery network
Instead of hosting all of your images, text and code for your website on a single server in a single location, a content delivery network (known as a CDN) hosts your website on multiple fast servers around the globe. So when a customer accesses your website, they connect to a server that is closest to them which speeds up their download speed. Also, a CDN does not have to host the whole site, it might only host some parts of the website, such as the videos, images or audio files.
CDN's are really recommended for websites that are experiencing high volumes of traffic.
There are many CDN's that can be used but a cheap common service is Amazon CloudFront.
Check Your Hosting Account
Check your server status
Sometimes servers can be down due to maintenance work which causes speed issues so check that this isn't currently an issue. Listed below are some places where you can check this on some of the most popular providers:
Or just Google "[website hosting name] + server status"
Check your server reliability
Sometimes a server is good during low periods of traffic but buckles under high volume. You'll need to use an uptime monitoring server to discover if this is the issue. Some sites that provide this service include:
If you've optimized your website and it's still slow then consider upgrading to a better server.
Many people run their sites on cheap hosting accounts. These usually run on something called shared hosting which is fine for most businesses when they're small. However if you're still having issues (which normally starts happening when begin to get several hundred visitors per day) then it might be time to consider upgrading to a dedicated host. You can do this with your existing server provider so check with them for deals.
Make the site mobile responsive
Mobile devices already make up a sizeable amount of website traffic and this trend is only increasing. Mobile devices also have slower internet connections and screens sizes (so they don't need to show too many or too big images). Because of this, all websites that are now developed should be designed for a range of different device sizes (this is known as being mobile responsive). Either make your existing website mobile responsive or insist that any new project you work on must have a 'mobile responsive' design.
Use website caching
When you visit a website your computer downloads that website temporarily onto your computer. Website caching bascially means that instead of downloading a new version of your website everytime someone visits your page, the computer instead will check to see if it already has those files and if it does then it's won't download them. An example of this is when you click the 'Back' button on a browser.
Most websites and browsers already have some form of caching already set up. These cache controls will usually have a expiring time limit on them, which lets the browser know when it should check again for a new version of the file.
So if you have a website (that runs on a Apache server) and you rarely change the website then you'd want to extend the HTTP headers so they last a longer period of time.
Finally, remember to turn off caching when making changes to your website as otherwise you might get confused. You'll only see the old version of the website and you'll be left wondering why you can't see any of the new changes.
Is your website still slow?
Then consider these issues...
- The software you're using might be out of date and it needs to be upgraded
- If you're using a platform like WordPress then try disabling some of your plugins as they might have erros or they be conflicted with other plugins
- You may have database issues/backend issues on your website that need to be fixed
How do you speed up your website? Let us know in the comments below...