Web Developement – unseen benefits of compliance

Wanna know why my personal web developer site is so high when searching for ‘cheshire web developer’ in Google, Bing, Yahoo, plus many more?

No.1 on yahoo.com when searching for the generic term ‘web developer’ and selecting results ‘from the web’.

Probably not, but here goes:

When I decided to rebuild my site, I considered SEO right from the planning stages – even before deciding on a design.

  1. I purchased a keyword rich domain & hosted in my target audience country
  2. Developed the site structure using modern technologies (XHTML/CSS – tableless design)
  3. Ensured all code is entirely standards compliant
  4. Incorporated as many WCAG features as possible
  5. Minimal use of flash
  6. Small images
  7. Transferred PageRank from previous domain
  8. Made full use of Google Webmaster Tools
  9. Textual content – used everything I’ve ever read about SEO

There are of course many more things that can be done, but this shows that sticking to the basics and getting them right, can really have a positive effect.

web developer

Large enquiry forms versus small enquiry forms

Instead of, or maybe as well as, an email link, most websites now contain some sort of contact or enquiry form. However, there is always a question of whether this form should be short and concise or long and detailed.

The short form will contain few fields, requesting basic information. The most common I have seen asks the user for her name, contact email address and telephone number, and then has a <textarea> where the user puts their questions or comments. It can take any thing from a few seconds, to a couple of minutes to complete. Quick and to the point. Useful if one needs to make a generic enquiry, such as ‘What time are you open on Friday?’

Example Short Form

Example short form

A large form asks for a lot more details – well over ten fields – and will normally take many minutes to complete in its entirety. As well as asking for more information about the user, it will often require detailed information about the product or service you are enquiring about. For example, asking for size, colour, style, amount, weight, etc. (example here)

Most of us would assume that the shorter enquiry form is going to get the responses we want, which can then be converted into sales. Afterall, it is shorter and takes less of the users time to complete. The table below shows the results of research carried out by PRWD.

Form type Preference Conversion rate
Short 14% 17%
Detailed 86% 55%

It appears that, not only do the vast majority of those who complete enquiry forms prefer the detailed comprehensive form, but the conversion to sales rate of the detailed form is over three times that of the short form. This flys in the face on conventional thinking and if anyone knows the reasons for this, I would love to hear them.

These figures are justification for those of us developing e-commerce or lead generating websites, to give serious consideration to including a detailed enquiry form.

More information available from http://www.prwd.co.uk/

XSL problem with Mozilla Firefox

If you are having problems with your XSL styles not being applied in Mozilla Firefox and Safari, try changing this line above the <head> of the XSL file:

<html>

to look like this:

<html xmlns=”http://www.w3.org/1999/xhtml”>

Usability, accessibility and screenreaders

This video from the University of Arkansas shows why descriptive text rather than ‘click here’ should be used for links and how skip navigation can improve user experience.

Change date from American format in ASP

This short ASP script will change the date in your database table from American format to a format which can be understood universaly.

OrderDate in the script refers to the column in the database table where the date is stored.

<%
'Change from American date format
If Day(DBOutput("OrderDate")) < 10 Then
'add a leading zero if date is single digit
Response.Write("0" & Day(DBOutput("OrderDate"))) & " "
Else
Response.Write (Day(DBOutput("OrderDate")))  & " "
End If
Response.Write(MonthName(month(DBOutput("OrderDate")), true)) & " "
Response.Write (Year(DBOutput("OrderDate")))
%>

Database connection script

As a developer, you probably use different servers throughout the development process. When you move your application from one server to another, you maybe have to change the database connection script in order for the application to work on the new server.

If you forget to do this, and the client is sitting in front waiting to see their new web application, it can be quite embarrassing. So, use this script to include several servers in your database connection statements and all will be fine.

<?php

/*This file is intended to be able to connect to your MySQL
database no matter where it is situated.
Insert your connection details for your different hosts into the
switch statement below.
You can add more hosts if you need to. */

$host = $_SERVER['HTTP_HOST'];

switch ($host)
{
case 'localhost':
$server = '';
$user = '';
$db = '';
$password = '';
break;

case 'domain of host 1':
$server = '';
$user = '';
$db = '';
$password = '';
break;

case 'domain of host2':
$server = '';
$user = '';
$db = '';
$password = '';
break;

default:
$server = '';
$user = '';
$db = '';
$password = '';
}

$link = mysql_connect($server, $user, $password);
if (!$link) {
die('Could not connect: ' . mysql_error());
}

$selected = mysql_select_db($db,$link)
or die("Could not select database");

?>

Fieldset and Mozilla Firefox – CSS

As you may know, <fieldset> creates a box with rounded corners, which looks really nice – in IE!

We can make it look almost as nice in Firefox very easily. Just add the following to your stylesheet:

/* This is to give rounded corners to fieldset in Firefox */
fieldset {
-moz-border-radius: 8px;
border-radius: 8px;
}

Googlemaps

Have decided to get into Googlemaps and purchased a book from Amazon. Now, I tell you, it’s very interesting and I can see loads of potential applications for this technology. From a developers position, perhaps an entreprenurial position, I can see that there’s scope for producing off-the-shelf application which clients can plug in to their existing web-based applications. On top of that, another benefit is that developing for googlemaps, using this book as a ‘bible’, means that the developer has no choice but to get experience with Ajax. Very CV enriching!

However, there is one big problem with Googlemaps – it’s based mainly on javascript technology.
So why is this a big problem? Check WCAG!

Ok, I’ll tell you. Using client-side scripting can create accessibility issues, as users may not be able to access all features due to the browser type or how the browser is configured. That’s why I generally stick to server-side scripting (PHP).

CSS IE7 Hack

So, you have a CSS class which looks just wrong in Internet Explorer 7 (IE7). This is quite simple to rectify.

Suppose the top margin is just right in all browsers except IE7, where it is too small. No problem. Set the class in the normal way, as follows, but use the value which looks best in IE7.

.gap {
margin-top: 1em;
}

Ok. Now we have a margin that looks great in IE7, but too small in other browers. So we need to change it without affecting IE7. We do this by redefining the above class in a manner that will be ignored by IE7, and we do it as follows:

html>/**/body .gap {
margin-top: 1.2em;
}

We need to include both sets of code in the stylesheet. IE7 hates this hierarchical way of declaring classes in CSS and so ignores it. The declared values for the class are re-written for other browsers.

PHP lessons

Over the passed few months, I have received numerous comments from people, on the same course as me, to the effect that they wished I would teach them PHP.

I have decided to call their bluff and offer to run classes during the summer. Well, I have been surprised by the overwhelming response and have set up a private area of my website to facilitate the lessons.

If you wish to know more, Contact me.