How to develop a fast loading website

Is your website taking forever to load? Are you losing customers from having a slow loading website? In this article, we will discuss some techniques on how we can improve the loading speed of your website. One of Google’s algorithms for high organic search engine rankings is having fast loading web pages. In order to be successful online you can’t ignore Google. The people at Google have the interest of the search query user at heart. If you listen to Google’s suggestions you’ll have a better website and reap the benefits of higher search engine rankings.

Increase your website speed

Cascade style sheets – CSS

CSS has made web formatting easier for designers and developers since its birth in 1996. For those who are unfamiliar with CSS, it is a programming language that allows designers to easily change the look and change of a web page.

Before the time of CSS, designers had to apply formatting to every single page throughout the website.  If you’re working on a website that has 10,000 pages and you were asked to modify fonts and colours on every single page it would take you forever and a day.

Use one external CSS file

There are some great benefits of using one external CSS file. All your CSS coding will be stored in one file – making your life easier when you return to modify this website later.  If you’re using third party plug-ins that use CSS it’s best to merge multiple CSS files into one larger CSS file. If a web browser has to read and download multiple CSS files it will take longer for the web page to load.

CSS checklist

  • Use shorthand CSS.
  • Remove any comments and white space from your CSS file.
  • Create one external CSS file – if you have multiple CSS files merge these into one external CSS file.
  • Take advantage of CSS sprites – if there are design elements that you can create using CSS this is worth doing. An example with CSS3 you can create navigation with elegant gradients.  Saving you designing navigation in Photoshop, but more importantly reducing HTTP requests.

Reduce HTTP requests

Where someone visits your website the web browser deals with a number of HTTP requests. An example of a HTTP request is when the web browser has to ask the web server for certain information including: an image, external hyperlinks or translate a PHP query.

Reduce the number PHP queries

PHP can be very productive for developers that are running larger websites. The blogging platform WordPress uses a colossal amount PHP scripting. Although, WordPress is targeted at non-technical people, there are some PHP codes that can be replaced by HTML. If you’re familiar with HTML you can hand code the web pages directly into your WordPress and leave the Widgets.

Think of PHP as a foreign language, the web browser doesn’t understand PHP, luckily the web server does. The web server is the translator for the web browser. The more PHP that your website uses the longer it’ll take for your website to download.

Use Relative URL paths

Throughout your website it’s important to use relative URLS where possible. A relative URL is a file or directory that’s related to your present file or directory location.

A relative URL is ideal for internal linking for example:

<a href=”aboutus.html”>About Us</a>

An absolute URL states the full URL as you’d type in the web browser for example:

<a href=>Intrahost</a>

Using relative URL paths minimises the number of HTTP requests that the web browser has to read.

Use DIV tags

Building websites in tables is out of date and makes your web page heavy.  Tables contain a lot of information for the web browser to process.  DIV and CSS are lighter and easier to work with.

Use images wisely

can make a web design layout look brilliant. However, images can seriously slow your website down.  Design is important, but you need to consider if these images are necessary. If your main design layout is made up from 25 images that’s 25 HTTP requests on images alone. Consider what’s absolutely critical for your website.  Although we have broadband, you still need to reduce your image file size.

Place external JavaScript at the bottom of your web page

The web browser reads content from top to bottom. JavaScript takes the most amount of time to load. It makes sense for the rest of the website to load first then apply the JavaScript last. Chances are the JavaScript isn’t the most important element on your website.

When you develop a website always ask yourself: “what’s important for the web user?” Make the web page fast loading and relevant to the web user.

Minimise the usage of Flash

It is not advised to develop a full Flash based website. Google can’t read a Flash based website and people may not have the patience for the website to load. You can use Flash, however, it’s important to use it sparingly and when it’s absolutely necessary.

Invest in good reliable hosting

Depending on your budget the best option for fast web hosting is a Cloud server. You have access to unshared resources and reap the benefits of a fast loading website. However, if you have a small business and a small online presence this is not realistic.

To get the best web hosting for your money, it’s important to do some market research. Find out as much as possible about your potential web hosting provider. Telephone the contact support team. Ask people in your network which hosting providers they use.  Price is often considered as the number one factor for web hosting. Remember that quality web hosting comes at a price.

Who controls your website?

Last week Computer Weekly reported on a worrying state of affairs amongst UK SMEs and their lack of control over their web presence. Do any of these apply to your business?

  • More than half of SMEs cannot make their own changes to their website
  • Two-thirds lack the contact details of their hosting company
  • Two-thirds do not have the passwords for their hosting account
  • Nearly three-quarters have not registered all their domain names in the name of the business owner

Most UK businesses do not have the in-house skills to create and host their own website and so it is natural that they should outsource this process. However, it is becoming clear that many businesses have let their lack of understanding of the process interfere with their control over their web presence.

Problems that can arise from these situations:

  • Unable to make your own changes means that you may be paying up to £50 an hour for simple changes to the text on your website.
  • Understandably, many companies baulk at paying to amend a website and so it's site becomes increasingly out of date and irrelevant. It may even harm the business if it seems to be lacking in awareness of new developments in its market.
  • If you cannot contact the hosting company what do you do if you check the Internet and your website doesn't appear? "error cannot be found". Remember, your customers are seeing that message too.
  • Even if you have some employees who are Internet savvy they cannot help your company website if do not have the username or password for the hosting account.
  • If a domain name is not registered in the owner's name then there is no proof that they own the domain. It means it (and your email of course) can be controlled by the person in whose name it was registered... perhaps a now, disgruntled, ex-employee, a former business partner or even an angry ex-spouse! Many businesses discover their domain name is registered to the web designer who created their first website, a practice that has thankfully become rarer in recent years.

That last point brings us to the problems that can arise where the inexperienced SME owner left the "web thingy" in the hands of the confident local web designer who offered the "complete service". He did the design, development, implementation, uploaded the pages, provides the hosting and maintains the domain name.

For many SMEs this type of services proves to be a godsend and enables them to get their enterprise online with the minimum of fuss and at a reasonable price. But does the phrase "all your eggs in one basket" ring a bell?

From the point of view of the SME, its online presence has a SPOF - a single point of failure - the web designer. What if he drops dead tomorrow? How long would it take to get control of your domain if it's in his name? What happens to your web site in the mean time. Will the website still be hosted if he is not there to maintain the server or pay the contract with his hosting supplier? The problems are easily imagineable.

The solution? Well both SME owners and managers have to seize back control of their websites. The complexity of this will vary from SME to SME and the circumstances surrounding their exisiting web set-up.

  • Contact the designer and have a friendly chat, determine the answer to the questions raised above e.g. in whose name the domain is registered; ask about backup and emergency plans in the case of his illness or holiday.
  • Get the web site username and passwords, and ensure the info can be found in an emergency.
  • Transfer your domain into the business owner's name - we at Intrahost are happy to help our customer's do this - which means if all else fails you can point the domain's DNS (Domain Name Servers) to a new hosting company and get your website back online in an emergency.
  • Get a backup of your website saved regularly so you can upload it to a new host (see above) if necessary.

The best way to enable an SME to make minor alterations to a website, where they lack the in-house coding skills, is to either have the website moved to a CMS (content management system), like Joomla! or to attach a blog to the site (using WordPress) - both of which allow the relatively unskilled to make regular changes to the content of a web site - and the changes be free of charge and timely.

Is your WordPress blog food for worms?

Is your WordPress blog running on the latest version of the self-hosted blog software? If not your blog could quickly become food for worms - well, one worm in particular that is doing the rounds of out-of-date, unpatched WordPress blogs.

This worm exploits a security bug that allows evaluated code to be executed through the permalink structure, makes itself an admin user, then uses JavaScript to hide itself so you can't see it if you look at the users page - it also attempts to clean up after itself and finally inserts hidden spam and malware into your old posts.

The danger of a worm like this is that your website could be banned from Google for hosting malware or being used for spamming.

The cure is a simple one, thankfully, just make sure you are running the latest version of WordPress, 2.8.4

In fact, the security vulnerability was fixed in the previous release, so you can get away with running 2.8.3. But upgrading WordPress has been made simpler over the versions and now it really is a "one-click fix".

As a hosting company we promote this type of news as we believe this simple upgrading is part of being a good 'virtual' neighbour to other users on shared web servers. If you allow your blog to be breached by this worm and be banned from Google, then other customers who share your web server (and its IP address) could also find their websites removed from Google's index - guilt by association!

So please take a few seconds to check that your WordPress blog software is 2.8.3 or higher - and hope that your virtual neighbours are doing the same!

WordPress 2.8.2 available

WordPress version 2.8.2 upgrade is now available; it is a security release to fix a XSS vulnerability. Comment author URLs were not fully sanitised when displayed in the admin which could be exploited to redirect you away from the admin to another site.

To upgrade either download version 2.8.2 or automatically upgrade from the Tools->Upgrade page of your WordPress blog’s admin area.