How to speed up my slow website

Many years ago, websites simply consisted of a few lines of text – loading almost instantly. However, as times have gone by, we’ve added more and more content to our websites, which results in websites which load slower.

Google uses page load speed as a ranking factor, so if appearing in search engines such as Google is important for your website, you should definitely consider the following points.

Optimize (compress) images

Since images usually take up a large percentage of your website’s content, it’s important for page speed that the sizes of these images are kept as small as possible, whilst maintaining high image quality.

Ideally, to get the best compression ratio, you should use a different compressor for each type of image; jpeg, png etc.

Related Topic:  Why Website Speed Matters

For PNG images, I’d recommend using TinyPNG. On one image I tested – which was originally 2.85MB, TinyPNG reduced to just 685KB! That’s an incredible 77% reduction in size! Since this is lossy compression, you might notice a slight reduction in quality, but only when you inspect the images very closely.

If you have JPEG images (usually photos taken with a camera), JPEGmini is good choice here, and offers lossless compression. As an example, I managed to compress a JPEG image from 2870KB to 1927KB, with no visible loss of quality!

Enable Gzip Compression

This works by compressing your website’s content whilst in transit from your web host to the visitor. Most websites use gzip compression these days, so if you don’t implement it you’ll be left behind.

[button size=”big” text=”FREE Speed Analysis Of Your Website” link=”” color=”blue”]

Enable Gzip Compression on Apache web servers

To enable it on Apache web servers, simply add the following code to your .htaccess file (which can be found in the main directory of your website):

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

Read More:  Get Expert Help with Website Speed Optimization

Enable Gzip Compression on NGINX web servers

Alternatively, if you use NGINX web server, you should add the following code to your configuration (config) file:

gzip on;
gzip_comp_level 2;
gzip_http_version 1.0;
gzip_proxied any;
gzip_min_length 1100;
gzip_buffers 16 8k;
gzip_types text/plain text/html text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;

# Disable for IE < 6 because there are some known problems
gzip_disable “MSIE [1-6].(?!.*SV1)”;

# Add a vary header for downstream proxies to avoid sending cached gzipped files to IE6
gzip_vary on;

For our site, this gave an incredible reduction in the size of our page, which relates to an increase in page speed of up to 78%!


Enable Browser Caching

If your website uses WordPress as it’s CMS, I’d recommend installing a plugin such as W3 Total Cache, which takes care of adding the code needed – all you need to do is activate the plugin and select the options.

Alternatively, if you’re not using WordPress, or you’d rather do this manually, simply add the following lines of code to your .htaccess file (located in the ‘public_html’ folder:

ExpiresActive On
ExpiresDefault “access plus 1 second”
ExpiresByType image/jpeg “access plus 2592000 seconds”
ExpiresByType image/jpg “access plus 2592000 seconds”
ExpiresByType image/png “access plus 2592000 seconds”
ExpiresByType image/gif “access plus 2592000 seconds”
ExpiresByType text/css “access plus 604800 seconds”
ExpiresByType text/javascript “access plus 604800 seconds”
ExpiresByType application/javascript “access plus 604800 seconds”
ExpiresByType text/html “access plus 2592000 seconds”

Use a CDN (Content Delivery Network)

Whilst you may have the perfect setup if you have a web server in the UK and 100% of your site’s visitors are based in the UK, the reality is usually that visitors come from all over the world. To have a web server in each of these countries would be an expensive nightmare, so CDN’s are becoming increasingly popular as a way to have a ‘virtual’ server in many countries across the world.

CDN companies essentially have servers in many locations across the world which hold (cache) copies of your website and it’s content such as images, videos, attachments etc. Most websites will usually have their website hosted in the USA or Europe, so if you’re based in Australia for example, it’d be much quicker to download large files such as images from a CDN in Sydney rather than the main web server in the USA or Europe.

Struggling with a slow website? These tips should help or if you’d like we’ll be happy to to take a look at your website and provide you a FREE review, Contact one of our consultants today or call us at 1-800-379-2829.

[button size=”big” text=”FREE Speed Analysis Of Your Website” link=”” color=”blue”]

Website Speed Optimization Company