Scott of the Antarctic teaches us about website page speed.

Scott of the Antarctic teaches us about website page speed.

What can Scott of the Antarctic teach us about website page speed?

Back in March last year I wrote a blog post about website page speed loading and how it was increasingly a ranking factor for search engines.

A year on from that post, website page speed loading has become an even more important aspect of optimising for search engine traffic.

Did you know that a 1 second delay in your page loading could reduce your page views by 11% and can reduce your conversion rate by up to 7%?

There are many aspects that control how fast a website page loads and some of these were covered in my post last year but in this one, I wanted to discuss the idea of caching and“expires headers” which can make a big difference to how Google and other search engines view your site.

What is a cache?

You may have heard the tale of Captain Scott of the Antarctic and the famous quote of his companion Lawrence Oates:

“I am just going outside and may be some time”

before disappearing out into a blizzard never to return. You may not know, however, that Captain Scott (who died 29th March 1912) and his group had been stuck due to the poor conditions only a mere 11 miles from a cache of food which may have saved them.

We explore website page speed in our latest blog.

Henry Bowers (1883 – 1912) [Public Domain]

The word “cache” is a 19th Century word derived from the French “Cacher” meaning “to hide” (source) it means a “collection of items of the same type stored in a hidden or inaccessible place” it is sometimes used to refer to a hidden cache of food or weaponry but in modern times you are most likely to hear it in the context of computing where it refers to a collection of files, programme instructions or data held for fast retrieval by the computer system.

People are generally most familiar with the word when it is used to refer to a web browser cache and it is this that I am going to talk more about here.

The Browser Cache Thingamajig

Website page speed is affected by many things. When you type a website URL (domain name) into your browser’s address bar, the first thing that the browser must do is look up the IP address to locate the files and data for the website that it refers to. 

This is done by referencing a DNS (Domain Name System) server that “resolves ” that URL and points the browser to the correct location of the website files. Your browser then sends a request to the web server saying“ I want the files, images and scripts for this webpage please” (not in quite so many words) and the web server will then start sending these to the browser. 

Browsers are clever though and if you have visited this particular web page before, it might still have some of the files, scripts and images stored in its cache. It is far quicker to load these up from a local store than to request and download them from the web server.  Loading the files from the web server requires the browser and server to talk to each other which takes time and relies on the speed and latency in the connection between them. Therefore, if a browser has the files locally, it will not download them again from the web server before loading the web page up and displaying it to the user.

You may have experienced the effects of this yourself  – have you ever been speaking to somebody on the phone or via Skype or a similar service talking about a website that you and the other person are both looking at only to realise that one of you is seeing different information?

“Try clearing your browser cache”

is often the solution that is suggested in these situations and for good reason because you may be seeing files and data stored in your browser’s cache rather than the latest version that resides on the web server.

“Those that do not remember the past are condemned to repeat it”

said George Santayana and at the time he probably wasn’t thinking about browser caching but it leads nicely on to me talking about the need for the currency of information.

What if your browser is storing images, data and instructions from a web page that are no longer up to date? The information has changed on the web server but the version that the user is shown in the browser window is different and now out of date?

This can cause a problem just as big, if not bigger, than that of slow loading web pages so what can we do about it? What we can do is set some rules for the lifespan of different types of file or data that will be stored by the browser in its cache.

For example, if we specify that certain elements, say *.png images, have a lifespan of 1 week before they are likely to change, then the browser will know that if it has .png images from a particular webpage that are more than 1 week old, it will need to load them again from the web server. Similarly, if the .png images in the browser cache are less than the specified 1 week old, the browser knows it can use the faster option of loading up the locally stored copies.

It is a balancing act between webpage speed through caching and the currency of the webpage and if no lifespan is specified for an element of a webpage it could potentially be kept in the browser cache and used over and over until such time as you clear that cache.

If you are still with me at this point and not yet thinking about wandering off into the nearest blizzard never to return… then read on for an explanation of Expires Headers.

How to Use Expires Headers

Put simply, expires headers tell the browser whether they should download a specific file from the server or whether they should load it from the browser’s cache. You can use these to specify a rule for individual files or for types of files. The idea is that if a browser and server know the lifespan of a particular type of file, they then have to talk to each other less in order to render the complete web page. The fewer requests that a browser has to make (and the fewer responses required from the server), the faster the web page can load up. Specifying a caching policy for the elements of a website is sometimes referred to as leveraging the browser cache.

The rules are specified in your htaccess file which resides on the web server and is one of the first things that will be read when a browser requests a webpage. They should be written in the format below:

<IfModule mod_expires.c>

  ExpiresActive On

  # Images

  ExpiresByType image/jpeg”accessplus 1 year”

  ExpiresByType image/gif”accessplus 1 year”

  ExpiresByType image/png”accessplus 1 year”

  ExpiresByType image/webp”accessplus 1 year”

  ExpiresByType image/svg+xml”accessplus 1 year”

  ExpiresByType image/x-icon”accessplus 1 year”

  # Video

  ExpiresByType video/mp4″accessplus 1 year”

  ExpiresByType video/mpeg”accessplus 1 year”

  # CSS, JavaScript

  ExpiresByType text/css”accessplus 1 month”

  ExpiresByType text/javascript”accessplus 1 month”

  ExpiresByType application/javascript”accessplus 1 month”

  # Others

  ExpiresByType application/pdf”accessplus 1 month”

  ExpiresByType application/x-shockwave-flash”accessplus 1 month”

</IfModule>

This example shows images being given a lifespan of 1 year and javascript files a lifespan of 1 month.

Be very careful if you edit your htaccess file because it is very easy to take your whole website down if you make a mistake!

Proper use of expires headers can reduce the number of requests that a browser must make to load up any given web page and they help to ensure that the user is seeing the most up to date version of that web page. Search engines prefer sites that have properly defined Expires Headers rules over those that do not because, in general, those with the rules specified will load up quicker(ina like for like comparison).

Have you leveraged browser caching for your website? It is a simple case of placing code similar to the above example into your htaccess file (or asking your web developer to do so on your behalf). In fact, the above code will work for most websites and can be copied and pasted into your htaccess file – just adjust the lifespan of each type of file to suit the frequency with which they will change on your website.

Not yet convinced that the merits of page speed are worth the effort? Why not have a look at this excellent infographic from our friends over at Hosting Tribunal.

Originally published at www.concisetraining.net on 11th March 2019.

7 things to check before your website is good to go

7 things to check before your website is good to go

7 things to check before your website is good to goYour website is likely to be one of the most important investments for your business. Whether you choose a website development company, or opt for one of the many website builder software tools available, you need to ensure your new website will showcase your brand, provide a good user experience and ultimately result in customers.  At Concise Digital, we believe the following 7 aspects should be included as standard so you don’t have to spend additional money on a phase 2:

1. A good visitor experience

A great website understands the user’s needs and tells a story your prospects can connect with. Visitors will make split-second decisions about your business based on your website looking at:

  • If your services are relevant to them (offering)
    If you deliver a good service (testimonials)
    Whether you have the expertise to deliver the services you offer (blogs/articles/credentials)
    How you work with your customers (user experience)
    A well planned, easy to navigate website that makes it easy for visitors to find what they’re looking for is the best way to keep them engaged. Great copy and appealing images that help tell your story will add to the experience.
2. Calls to action

Does your website have clear “calls to action” to help convert casual visitors into customers?  Calls to action (CTAs) are a visual stimulus to help guide the visitor through the site, draw attention to content and prompt purchasing decisions.  CTAs don’t necessarily need to adopt the “Buy Now” approach, they can come in many shapes and forms. They can convince a user to download information, sign up to your mailing list or help increase social media followers and shares.

3. Mobile friendly

A good website will work well across different browsers and devices. These days, the majority of users coming to your site are likely to be using a mobile device so it is imperative that your website is mobile friendly. Why not test how mobile friendly your site is with this free Google tool?

Did you know, some types of videos cannot be played on mobile devices, such as license-constrained media or content that requires media players such as Flash.  Make sure you don’t give your users an unexpected ‘video free’ experience.

Many sites have sign-up forms to collect emails to nurture leads or apps offering a chat function. If you intend to include these types of apps, check that they do not obscure the screen on a mobile device and are easy for the user to dismiss.

4. Initial Search Engine Optimisation as standard

A well-designed and appealing website is only useful if people can find it. If your website is invisible because of poor optimisation, you are missing opportunities with potential customers.

We believe that search engine optimisation should be a consideration when planning your website and included as part of the build rather than an add-on. Ensure each page is individually optimised for keywords and phrases relevant to the content so that search engines understand what your web pages are about.  It is so much easier and cheaper to do this as part of the initial build rather than paying for this as an add-on service.

It is true that this is only part of the requirements for search engine optimisation, but it is an important part.  If search engines don’t know what your web pages are about how can they be expected to rank them?

Search engine optimisation algorithms include hundreds of variables including website speed, mobile friendliness, number of visitors, broken links, bounce rate, repeat visitors, links from other websites, time on site and page views. Some things are in your control such as checking your website for broken links and making sure images have meaningful ALT text.

Google Search console and Google Analytics are fantastic tools to help you understand how Google and visitors find and use your website and should (in our opinion) be installed right from the beginning of a new website.

5. Site speed

Page loading speed should also be a consideration as part of the development process on any good website. Pages that take a while to load are not only frustrating for the user but will affect your Google rankings.  Page speed can be improved by how a website is technically created as well as how images are optimised.

The PageSpeed Insights report by Google gives insight into the real-world performance of a page for mobile and desktop devices and provides suggestions on how that page may be improved.

6. Clearly defined policies

As soon as you configure Google analytics on your website (our favourite is a plugin called Monster Insights), you will be adding cookies.  By law, you need a proper cookie policy on your site that tells people how your website uses cookies and gives users options of accepting and rejecting them.

If you collect personal information from visitors such as a newsletter sign-up form, you are legally required to have a privacy policy. Here are the changes we have made to our privacy policy to ensure we complied with the additional GDPR guidelines.

7. Maintenance

It is likely that you will need to make changes to your website in future, so understanding how easy it is to edit and maintain your site (and what training is available) is worth considering before you start.

In addition, changes in technology may mean that your website needs to be updated regularly to keep it secure.  Make sure you understand the cost of any maintenance contract so you do not get stung further down the line – or end up with a site that can be hacked.

At Concise Digital, we are proud to create WordPress websites that are “good-to-go”, with clearly defined specifications and costs up front and of course, all the above included as standard. If you are looking to enhance your brand with a new website then please get in touch and we can discuss some options with you.