﻿<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Janric Website Design &#187; Coding Tips</title>
	<atom:link href="http://www.janric.co.uk/blog/index.php/category/coding-tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.janric.co.uk/blog</link>
	<description>Website Design And Marketing Services Blog</description>
	<lastBuildDate>Tue, 31 Jan 2012 06:15:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.3</generator>
		<item>
		<title>Detecting IOS And Android Devices</title>
		<link>http://www.janric.co.uk/blog/index.php/coding-tips/detecting-ios-and-android-devices/</link>
		<comments>http://www.janric.co.uk/blog/index.php/coding-tips/detecting-ios-and-android-devices/#comments</comments>
		<pubDate>Wed, 26 Oct 2011 20:39:10 +0000</pubDate>
		<dc:creator>Keith Lunt</dc:creator>
				<category><![CDATA[Coding Tips]]></category>
		<category><![CDATA[Mobile Phones]]></category>

		<guid isPermaLink="false">http://www.janric.co.uk/blog/?p=2686</guid>
		<description><![CDATA[There are many reasons why you might want to detect the presence of a visitor who is using an Android device or an IOS device, such as the iPhone, iPod Touch or an iPad. But, how is it possible? It is quite simple. Just add the following bit of code to the top of your [...]]]></description>
			<content:encoded><![CDATA[<p><strong>There are many reasons why you might want to detect the presence of a visitor who is using an Android device or an IOS device, such as the iPhone, iPod Touch or an iPad. But, how is it possible?</strong></p>
<p>It is quite simple. Just add the following bit of code to the top of your PHP pages and you can decide what to do depending on their device:</p>
<p>if(strstr($_SERVER['HTTP_USER_AGENT'],&#8217;iPhone&#8217;) || strstr($_SERVER['HTTP_USER_AGENT'],&#8217;iPod&#8217;))<br />
{<br />
  // process as IOS device<br />
}<br />
else if(stripos(strtolower($_SERVER['HTTP_USER_AGENT']), &#8216;android&#8217;) !== false) {<br />
  // process as Android<br />
}</p>
<p>But, why might you want to do this? Well you might have developed an app for both iPhone (etc) and Android and want to use a QR code for distribution. However, you need to codes &#8211; one to link to the Marketplace download page and the other to link to the iTunes download page. But, with this code you get the QR to link to a page on your website, decide which page the visitor needs and redirect to the relevant page. You can then also count how often the code is used, track how often users of other devices arrive and so on.</p>
<p>Simple.</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fdetecting-ios-and-android-devices%2F&amp;title=Detecting+IOS+And+Android+Devices" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fdetecting-ios-and-android-devices%2F&amp;title=Detecting+IOS+And+Android+Devices" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fdetecting-ios-and-android-devices%2F&amp;title=Detecting+IOS+And+Android+Devices" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fdetecting-ios-and-android-devices%2F&amp;headline=Detecting+IOS+And+Android+Devices" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Detecting+IOS+And+Android+Devices&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fdetecting-ios-and-android-devices%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Detecting+IOS+And+Android+Devices&amp;u=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fdetecting-ios-and-android-devices%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Detecting+IOS+And+Android+Devices&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fdetecting-ios-and-android-devices%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Detecting+IOS+And+Android+Devices&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fdetecting-ios-and-android-devices%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Detecting+IOS+And+Android+Devices&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fdetecting-ios-and-android-devices%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fdetecting-ios-and-android-devices%2F&amp;title=Detecting+IOS+And+Android+Devices&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fdetecting-ios-and-android-devices%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fdetecting-ios-and-android-devices%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fdetecting-ios-and-android-devices%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.janric.co.uk/blog/index.php/coding-tips/detecting-ios-and-android-devices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>With the growth of Apple, your flash is wasted</title>
		<link>http://www.janric.co.uk/blog/index.php/coding-tips/with-the-growth-of-apple-your-flash-is-wasted/</link>
		<comments>http://www.janric.co.uk/blog/index.php/coding-tips/with-the-growth-of-apple-your-flash-is-wasted/#comments</comments>
		<pubDate>Sat, 19 Mar 2011 22:08:53 +0000</pubDate>
		<dc:creator>Keith Lunt</dc:creator>
				<category><![CDATA[Coding Tips]]></category>

		<guid isPermaLink="false">http://www.janric.co.uk/blog/?p=2443</guid>
		<description><![CDATA[Have you recently looked through your website stats to see just how many people are accessing your website using Apple technology? Ignore those on Apple Macs &#8211; test for Safari and they are happy. But count up the iPhone, iPod Touch and iPad hits. On one site that I looked at recently mobile devices accounted [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Have you recently looked through your website stats to see just how many people are accessing your website using Apple technology?</strong></p>
<p>Ignore those on Apple Macs &#8211; test for Safari and they are happy. But count up the iPhone, iPod Touch and iPad hits. On one site that I looked at recently mobile devices accounted for 20% of hits, and Apple devices the majority of these hits.</p>
<p>People are sitting on trains, in buses, waiting for children to finish their hobbies and so on and want something to do. A few presses of a screen and their iPhone is on the internet and they can be planning their lives.</p>
<p>That is why over the last year our website stats have gone from a tiny number of iPhone hits to a huge number. The technology is spreading, more people are aware of the advantages and the internet access is cheap. I even now of someone (who is a technical guy), who has cancelled his broadband connection in favour of mobile technology.</p>
<p>So what&#8217;s the big problem then with maybe 10% &#8211; 20% of our visitors arriving via IOS devices? Well, there is a huge problem, if you are using certain technologies.</p>
<p>For whatever reason, Steve Jobs and Apple refuse to implement Flash technology into IOS devices. If your website runs entirely in flash, or uses Flash navigation bars, then those people accessing it via their IOS device are not going to get the experience you want. In fact, at the extreme they won&#8217;t see the website at all.</p>
<p>At the very best, if you have used Flash for a banner that is key to your design then the pages aren&#8217;t going to look as impressive as they should do. And when someone sees that a bit of your website doesn&#8217;t work on their IOS device, are they going to switch to another device, continue anyway or maybe go elsewhere?</p>
<p>Personally, I would rather not take the chance. Potentially losing 20% of traffic just because I want a Flash animation is not worth it and I suspect as the technology gets cheaper more people will be using IOS devices to access websites.</p>
<p>So, what are our choices? Well we can scrap flash totally. Flash written websites are a bad idea anyway, so rewrite them and they will become search engine friendly.</p>
<p>But do you need to rewrite a website if it has flash banners or navigation? You could do, but the gains are probably not worth the effort. It would be more efficient to just provide a suitable non-flash alternative &#8211; links in basic HTML and a jpg or a gif banner to replace the Flash banner.</p>
<p>It is easy enough to do and if it means that you rescue up to 20% of your visitors, then why not?</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fwith-the-growth-of-apple-your-flash-is-wasted%2F&amp;title=With+the+growth+of+Apple%2C+your+flash+is+wasted" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fwith-the-growth-of-apple-your-flash-is-wasted%2F&amp;title=With+the+growth+of+Apple%2C+your+flash+is+wasted" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fwith-the-growth-of-apple-your-flash-is-wasted%2F&amp;title=With+the+growth+of+Apple%2C+your+flash+is+wasted" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fwith-the-growth-of-apple-your-flash-is-wasted%2F&amp;headline=With+the+growth+of+Apple%2C+your+flash+is+wasted" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=With+the+growth+of+Apple%2C+your+flash+is+wasted&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fwith-the-growth-of-apple-your-flash-is-wasted%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=With+the+growth+of+Apple%2C+your+flash+is+wasted&amp;u=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fwith-the-growth-of-apple-your-flash-is-wasted%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=With+the+growth+of+Apple%2C+your+flash+is+wasted&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fwith-the-growth-of-apple-your-flash-is-wasted%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=With+the+growth+of+Apple%2C+your+flash+is+wasted&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fwith-the-growth-of-apple-your-flash-is-wasted%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=With+the+growth+of+Apple%2C+your+flash+is+wasted&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fwith-the-growth-of-apple-your-flash-is-wasted%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fwith-the-growth-of-apple-your-flash-is-wasted%2F&amp;title=With+the+growth+of+Apple%2C+your+flash+is+wasted&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fwith-the-growth-of-apple-your-flash-is-wasted%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fwith-the-growth-of-apple-your-flash-is-wasted%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fwith-the-growth-of-apple-your-flash-is-wasted%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.janric.co.uk/blog/index.php/coding-tips/with-the-growth-of-apple-your-flash-is-wasted/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How CSS Can Clean Up a Website&#8217;s Code</title>
		<link>http://www.janric.co.uk/blog/index.php/coding-tips/how-css-can-clean-up-a-websites-code/</link>
		<comments>http://www.janric.co.uk/blog/index.php/coding-tips/how-css-can-clean-up-a-websites-code/#comments</comments>
		<pubDate>Sat, 26 Feb 2011 10:44:08 +0000</pubDate>
		<dc:creator>Keith</dc:creator>
				<category><![CDATA[Coding Tips]]></category>

		<guid isPermaLink="false">http://www.janric.co.uk/blog/?p=2418</guid>
		<description><![CDATA[Using CSS to create your website can take a bit of getting used to if you are still coding in tables. Why is CSS better and what can it do for you? Writing With Tables Laying out your website page with tables can be very easy and if you are displaying data, then sometimes it [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Using CSS to create your website can take a bit of getting used to if you are still coding in tables. Why is CSS better and what can it do for you?</strong></p>
<p><strong>Writing With Tables</strong><br />
Laying out your website page with tables can be very easy and if you are displaying data, then sometimes it can be the only practical solution. But heavy amounts of formatting and tables soon take their toll on your code.</p>
<p>The problem is that if you want more than a simple layout then you start looking at nested tables &#8211; where you have a table inside a table inside a table&#8230; It gets extremely ugly in the end and if you want to make a change to the layout, trying to figure out which table needs to move can be all but impossible.</p>
<p><strong>Cluttering Your Code</strong><br />
Using tables and formatting in your code means that the actual code becomes cluttered and heavy. Having to spell out the exact fonts and colours for every cell of a table produces a lot of coding, which you might regret when you come to update the style.</p>
<p><strong>How CSS Changes All Of This</strong><br />
You can put your CSS into style sheets and hide them out of the way of your main code. They are there when you need them, but not when you are just updating the text. Using divs with ids you can set the attributes of entire parts of the page remotely. From where on the page it is positioned to the text style down to even the border of the images within that section.</p>
<p>Correctly written CSS moves all formatting to a central file, or set of files. This means that formatting that is applied to every page does not need to be constantly written on each new page, just refer to the section by id or class and call it in.</p>
<p><strong>What Are The Advantages?</strong><br />
As I have already said, you move your formatting to one file, away from the text. This makes the text easier to update. But it also makes the formatting easier to update &#8211; for example, if you decide to change the colour of all of your links you just change it in the style sheet.</p>
<p>And because search engines can skip past reading the style sheet they get to the content of the page a lot quicker. This means that they can cache your content quicker, ignoring the formatting. This increases your content to code ratio, which can benefit you in search engine rankings.</p>
<p>It might take a little longer to get used to, especially working out what works across all browsers, but the end results give you a webpage that is a lot easier to maintain and one that should do better in search results.</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fhow-css-can-clean-up-a-websites-code%2F&amp;title=How+CSS+Can+Clean+Up+a+Website%27s+Code" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fhow-css-can-clean-up-a-websites-code%2F&amp;title=How+CSS+Can+Clean+Up+a+Website%27s+Code" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fhow-css-can-clean-up-a-websites-code%2F&amp;title=How+CSS+Can+Clean+Up+a+Website%27s+Code" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fhow-css-can-clean-up-a-websites-code%2F&amp;headline=How+CSS+Can+Clean+Up+a+Website%27s+Code" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=How+CSS+Can+Clean+Up+a+Website%27s+Code&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fhow-css-can-clean-up-a-websites-code%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=How+CSS+Can+Clean+Up+a+Website%27s+Code&amp;u=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fhow-css-can-clean-up-a-websites-code%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=How+CSS+Can+Clean+Up+a+Website%27s+Code&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fhow-css-can-clean-up-a-websites-code%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=How+CSS+Can+Clean+Up+a+Website%27s+Code&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fhow-css-can-clean-up-a-websites-code%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=How+CSS+Can+Clean+Up+a+Website%27s+Code&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fhow-css-can-clean-up-a-websites-code%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fhow-css-can-clean-up-a-websites-code%2F&amp;title=How+CSS+Can+Clean+Up+a+Website%27s+Code&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fhow-css-can-clean-up-a-websites-code%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fhow-css-can-clean-up-a-websites-code%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fhow-css-can-clean-up-a-websites-code%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.janric.co.uk/blog/index.php/coding-tips/how-css-can-clean-up-a-websites-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Testing different adverts</title>
		<link>http://www.janric.co.uk/blog/index.php/coding-tips/testing-different-adverts/</link>
		<comments>http://www.janric.co.uk/blog/index.php/coding-tips/testing-different-adverts/#comments</comments>
		<pubDate>Tue, 07 Dec 2010 11:24:47 +0000</pubDate>
		<dc:creator>Keith</dc:creator>
				<category><![CDATA[Coding Tips]]></category>

		<guid isPermaLink="false">http://www.janric.co.uk/blog/?p=1978</guid>
		<description><![CDATA[Many site owners with good traffic try their hand at a little bit of advertising. But, which advert out of the choice of many works best? Well that is the question I faced. I knew adding another advert to one of my websites would make it too heavy in the advertising front. And the problem [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Many site owners with good traffic try their hand at a little bit of advertising. But, which advert out of the choice of many works best?</strong></p>
<p>Well that is the question I faced. I knew adding another advert to one of my websites would make it too heavy in the advertising front. And the problem is that this week I am trying out 2 different adverts.</p>
<p><strong>Which earns the most?</strong><br />
One is for free business cards and the other for free PPC Advertising. Which would generate the best revenue?</p>
<p>There are two ways of testing this. Put one advert up, leave it running and then swap it over. But, how do you know that the trial is equal before deciding which earned the best income? That way is no good.</p>
<p><strong>Random display testing</strong><br />
So my preferred method is random displaying. This should work very well as many people do read multiple page on that blog, so could get to see both adverts! How do you code it?</p>
<p>Well very simply in PHP, using this code:</p>
<p>&lt;?php<br />
$addswitch = rand(1, 2);<br />
if ($addswitch == 1) { ?&gt;<br />
[html for first advert]<br />
&lt;?php } else { ?&gt;<br />
[html for second advert]<br />
&lt;?php } ?&gt;</p>
<p><strong>The vital line of code!</strong><br />
Yes, very basic and might be better with a switch statement, but the important aspect is that rand(1,2) statement. That is asking for a random number between 1 and 2. If you wanted to test more adverts or to weight an advert, that could become rand(1,3) etc.</p>
<p>But using even weighting, over the course of a few thousand page hits all thing should be roughly equal. So in a week I&#8217;ll look at both systems and see what income they have made. If neither is doing well then I might just put back the Google Adsense block I had there!</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Ftesting-different-adverts%2F&amp;title=Testing+different+adverts" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Ftesting-different-adverts%2F&amp;title=Testing+different+adverts" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Ftesting-different-adverts%2F&amp;title=Testing+different+adverts" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Ftesting-different-adverts%2F&amp;headline=Testing+different+adverts" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Testing+different+adverts&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Ftesting-different-adverts%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Testing+different+adverts&amp;u=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Ftesting-different-adverts%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Testing+different+adverts&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Ftesting-different-adverts%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Testing+different+adverts&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Ftesting-different-adverts%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Testing+different+adverts&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Ftesting-different-adverts%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Ftesting-different-adverts%2F&amp;title=Testing+different+adverts&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Ftesting-different-adverts%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Ftesting-different-adverts%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Ftesting-different-adverts%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.janric.co.uk/blog/index.php/coding-tips/testing-different-adverts/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Securing Your Site Admin Areas</title>
		<link>http://www.janric.co.uk/blog/index.php/coding-tips/securing-your-site-admin-areas/</link>
		<comments>http://www.janric.co.uk/blog/index.php/coding-tips/securing-your-site-admin-areas/#comments</comments>
		<pubDate>Mon, 13 Sep 2010 10:57:58 +0000</pubDate>
		<dc:creator>Keith</dc:creator>
				<category><![CDATA[Coding Tips]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.janric.co.uk/blog/?p=1614</guid>
		<description><![CDATA[If you are coding your own website and it has an admin area, then you might be surprised at how much security you have to include. If you do not, then a nasty surprise might be around the corner! An ideal way of securing the admin would be by only allowing access to one IP [...]]]></description>
			<content:encoded><![CDATA[<p><strong>If you are coding your own website and it has an admin area, then you might be surprised at how much security you have to include. If you do not, then a nasty surprise might be around the corner!</strong></p>
<p>An ideal way of securing the admin would be by only allowing access to one IP address. But, if you are like me then you (or your customer who is using the admin) might be allocated a different IP address every time they access the internet.</p>
<p>But what I have noticed is that most, if not all, hacking attempts have come from outside of this country. So the theory is quite simple, even if the actual coding is a lot more complicated.</p>
<p>What we have to do is to grab a list of IP address ranges and the countries that they relate to. Then, we just open up the access to the admin to those ranges that apply to a certain country.</p>
<p>It is quite simple, the only difficulty is in loading that list (I&#8217;ve been trying, the IP list is huge!). If you are going on holiday and needing to use the admin, or you have users abroad, then you can just extend this list either temporarily or full time. For example, it would be quite simple for me to allow access to UK and Ukraine IP ranges for my customer&#8217;s website where the customer is based in the Ukraine.</p>
<p>But, what to do if the IP address does not match an allowed country? Well that is a little bit of a choice. You could say that access is not allowed, but then you have given any potential hackers that little bit of information. They know they have found your admin and that it is protected by country. You could just fail or redirect to the home page. That bit is really up to you!</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fsecuring-your-site-admin-areas%2F&amp;title=Securing+Your+Site+Admin+Areas" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fsecuring-your-site-admin-areas%2F&amp;title=Securing+Your+Site+Admin+Areas" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fsecuring-your-site-admin-areas%2F&amp;title=Securing+Your+Site+Admin+Areas" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fsecuring-your-site-admin-areas%2F&amp;headline=Securing+Your+Site+Admin+Areas" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Securing+Your+Site+Admin+Areas&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fsecuring-your-site-admin-areas%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Securing+Your+Site+Admin+Areas&amp;u=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fsecuring-your-site-admin-areas%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Securing+Your+Site+Admin+Areas&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fsecuring-your-site-admin-areas%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Securing+Your+Site+Admin+Areas&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fsecuring-your-site-admin-areas%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Securing+Your+Site+Admin+Areas&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fsecuring-your-site-admin-areas%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fsecuring-your-site-admin-areas%2F&amp;title=Securing+Your+Site+Admin+Areas&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fsecuring-your-site-admin-areas%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fsecuring-your-site-admin-areas%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fsecuring-your-site-admin-areas%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.janric.co.uk/blog/index.php/coding-tips/securing-your-site-admin-areas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>6 Basic Website Security Steps</title>
		<link>http://www.janric.co.uk/blog/index.php/coding-tips/6-basic-website-security-steps/</link>
		<comments>http://www.janric.co.uk/blog/index.php/coding-tips/6-basic-website-security-steps/#comments</comments>
		<pubDate>Fri, 10 Sep 2010 10:03:11 +0000</pubDate>
		<dc:creator>Keith</dc:creator>
				<category><![CDATA[Coding Tips]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.janric.co.uk/blog/?p=1603</guid>
		<description><![CDATA[In my quest to beat the hackers who have had a go at some customer websites, I have created a list of a few basic security steps for people building their own websites. Please do leave comments of any others you can think of. 1) Make sure that passwords are not readable in your database. [...]]]></description>
			<content:encoded><![CDATA[<p><strong>In my quest to beat the hackers  who have had a go at some customer websites, I have created a list of a few basic security steps for people building their own websites. Please do leave comments of any others you can think of.</strong></p>
<p><strong>1) Make sure that passwords are not readable in your database.</strong><br />
Yes, it can make life more difficult when you need to reset your own password, but if a hacker manages to gain read access to your database (which can be quite easy, see step 5) then if passwords are on show they can access anything. Even if you just create an MD5 checksum of the password so that it is difficult to read, that is a step in the right direction.</p>
<p><strong>2) Give your logons good user names.</strong><br />
In single user systems it is tempting to do without user names or use basic names such as &#8216;admin&#8217;. Don&#8217;t! If a hacker has to find out a username and a password they are much less likely to get through. Store them on separate tables in your database, or in a single user (or limited user) environment, why not store the username in the PHP / ASP? A username is a good protection against brute force attacks.</p>
<p><strong>3) Check what you upload!</strong><br />
Does your admin allow you to upload files to your server? This is what a hacker wants &#8211; then they can upload their backdoors. If you are expecting to upload images check the file is an image (jpg, gif etc). If it is meant to be PDF validate that. Then, rename the file to hide it! For example picture.jpg might become 1.jpg.</p>
<p><strong>4) Do not directly access uploaded images.</strong><br />
If a hacker can upload a file, then they need to find out where it is stored. But, if you instead use a picture resizing routine which has the uploads directory hard coded, then there is no clue as to what directory the files are stored in. If a hacker realises that the uploaded files are well hidden it might be enough to make them leave your site alone.</p>
<p><strong>5) Validate all input string parameters.</strong><br />
To gain read access of the database a hacker can try to manipulate inputs. So, make sure the values are what you expected. For example, if you have <em>mypage.php?id=1</em> and the id is a number, then fail the script immediately if the id is not numeric.</p>
<p>If you are passing a string, within the PHP / ASP check it for an exact match on expected results before using it within a MYSQL query. You can do this by running through the database values or a hardcoded list.</p>
<p>If you are running a search function then this is a lot more difficult to protect, but not impossible. Make sure you use the POST method and check the referring page is on your website. If possible, remove all non alpha-numeric characters or at the very least backslash out quotes. If you don&#8217;t then they will cause problems anyway in genuine searches.</p>
<p><strong>6) Monitor failed logons.</strong><br />
And maybe even those queries detected in step 5. If the logon fails, send yourself an email. If there is a brute force attack you might find your email box suddenly filled up, so you might prefer to use a separate email address for this. If you want to be really clever monitor the failed logon attempts and lock your admin out for an hour after a few failed attempts.</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2F6-basic-website-security-steps%2F&amp;title=6+Basic+Website+Security+Steps" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2F6-basic-website-security-steps%2F&amp;title=6+Basic+Website+Security+Steps" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2F6-basic-website-security-steps%2F&amp;title=6+Basic+Website+Security+Steps" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2F6-basic-website-security-steps%2F&amp;headline=6+Basic+Website+Security+Steps" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=6+Basic+Website+Security+Steps&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2F6-basic-website-security-steps%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=6+Basic+Website+Security+Steps&amp;u=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2F6-basic-website-security-steps%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=6+Basic+Website+Security+Steps&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2F6-basic-website-security-steps%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=6+Basic+Website+Security+Steps&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2F6-basic-website-security-steps%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=6+Basic+Website+Security+Steps&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2F6-basic-website-security-steps%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2F6-basic-website-security-steps%2F&amp;title=6+Basic+Website+Security+Steps&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2F6-basic-website-security-steps%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2F6-basic-website-security-steps%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2F6-basic-website-security-steps%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.janric.co.uk/blog/index.php/coding-tips/6-basic-website-security-steps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>More Protection Against Hackers</title>
		<link>http://www.janric.co.uk/blog/index.php/coding-tips/more-protection-against-hackers/</link>
		<comments>http://www.janric.co.uk/blog/index.php/coding-tips/more-protection-against-hackers/#comments</comments>
		<pubDate>Wed, 08 Sep 2010 10:30:22 +0000</pubDate>
		<dc:creator>Keith</dc:creator>
				<category><![CDATA[Coding Tips]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.janric.co.uk/blog/?p=1598</guid>
		<description><![CDATA[I&#8217;ve already mentioned my problems with hackers, but here is something else that you need to do to protect your website from them. Once they decide to target your website one of the tricks they will attempt is to see if they can access your website. The aim is that hopefully you will have stored [...]]]></description>
			<content:encoded><![CDATA[<p><strong>I&#8217;ve already mentioned my problems with hackers, but here is something else that you need to do to protect your website from them.</strong></p>
<p>Once they decide to target your website one of the tricks they will attempt is to see if they can access your website. The aim is that hopefully you will have stored passwords on the database, then they will try to find the admin and logon to continue their work.</p>
<p>So, how can they access your database from the public screens? Actually, it is frighteningly easy, but almost as easy to stop it.</p>
<p>Take for example a page in which you pass an id. For example it ends <em>mypage.php?id=1</em>. You request the id and then use it in your MySQL as <em>WHERE id = &#8216;$id&#8217;</em>.</p>
<p>What they then attempt is to change the parameter. For example <em>mypage.php?id=1&#8242; AND &#8217;1&#8242; = &#8217;1</em> becomes in your code <em>WHERE id =&#8217;1&#8242; AND &#8217;1&#8242; = &#8217;1&#8242;</em>. Oops! As you can see, that would actually work (try it on your webite).</p>
<p>Once they have discovered their way in, then some extremely complicated SQL comes into play to dump the contents of the database.</p>
<p>So, how do you stop it? Well in this example it is easy. If you are expecting an integer, then try a piece of code such as:<br />
<em>$id = $_REQUEST['id'];<br />
if (!is_numeric($id)) {exit;}</em></p>
<p>This would stop interference in its tracks. It is more complicated when the field is non numeric. Here, if there are a limited number of values expected then we can build an array of expected values and then compare the value received to all of those in the array. By checking in PHP first, the syntax is different enough from SQL to be able to fail on one or the other.</p>
<p>If there are thousands of values, you could try substringing the received value to the first one or two characters (not enough for mischief to take place) and returning all valid values that start like that. Again, just use a simple PHP check to see if it is a match and fail if not.</p>
<p>The problem comes with searches, as there we do not know what to expect. It depends on how your search is working, but make sure you use a POST and $_POST to return the value so that parameters in the search bar don&#8217;t count. Maybe also make sure that the refering page is from your website and if you can, remove all non alpa numeric characters from the search string.</p>
<p>At the very least, backslash whatever type of quote you are delimiting the string with in your search function. If you don&#8217;t and someone innocently uses the string, they will get a failure anyway. But by backslashing it (e.g. <em>str_replace(&#8220;&#8216;&#8221;, &#8220;\&#8217;&#8221;, $_POST[search]</em>) you are preventing it from working to end the input string, which should hopefully again stop the hacking attempt.</p>
<p>It&#8217;s not nice when you see on your server logs that this has been happening, so the earlier you can put a stop to it the better. Protect your website now!</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fmore-protection-against-hackers%2F&amp;title=More+Protection+Against+Hackers" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fmore-protection-against-hackers%2F&amp;title=More+Protection+Against+Hackers" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fmore-protection-against-hackers%2F&amp;title=More+Protection+Against+Hackers" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fmore-protection-against-hackers%2F&amp;headline=More+Protection+Against+Hackers" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=More+Protection+Against+Hackers&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fmore-protection-against-hackers%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=More+Protection+Against+Hackers&amp;u=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fmore-protection-against-hackers%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=More+Protection+Against+Hackers&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fmore-protection-against-hackers%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=More+Protection+Against+Hackers&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fmore-protection-against-hackers%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=More+Protection+Against+Hackers&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fmore-protection-against-hackers%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fmore-protection-against-hackers%2F&amp;title=More+Protection+Against+Hackers&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fmore-protection-against-hackers%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fmore-protection-against-hackers%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fmore-protection-against-hackers%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.janric.co.uk/blog/index.php/coding-tips/more-protection-against-hackers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Website Design Secrets &#8211; Tips to Making a Website Look Professional</title>
		<link>http://www.janric.co.uk/blog/index.php/coding-tips/website-design-secrets-tips-to-making-a-website-look-professional/</link>
		<comments>http://www.janric.co.uk/blog/index.php/coding-tips/website-design-secrets-tips-to-making-a-website-look-professional/#comments</comments>
		<pubDate>Thu, 22 Jul 2010 12:39:54 +0000</pubDate>
		<dc:creator>Keith</dc:creator>
				<category><![CDATA[Building Websites]]></category>
		<category><![CDATA[Coding Tips]]></category>

		<guid isPermaLink="false">http://www.janric.co.uk/blog/?p=1156</guid>
		<description><![CDATA[Making a website look professional is not that difficult, you just need to follow a few rules. But it is so easy to go from a professional looking finish to a childish version that you need to take care at every step. There are no great secrets to making a website look professional, you just [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Making a website look professional is not that difficult, you just need to follow a few rules. But it is so easy to go from a professional looking finish to a childish version that you need to take care at every step.</strong></p>
<p><img src="http://sample.janric.co.uk/resizestock.asp?pic=Fotolia_1505473_XS.jpg&width=250" style="float:right; margin-left:10px;">There are no great secrets to making a website look professional, you just need to look at the result and make sure that you keep on track. Here are my favourite secret tips to follow!</p>
<p><strong>Do not make it too personal!</strong> &#8211; Unless you are selling yourself as a person, for example a children&#8217;s entertainer, then do not put lots of personality into the website. Too often I hear from my sales team that a customer would like a bit of this in and a bit of that. Yes, they make the sites look very personalised, but too often these take away from the professional look. </p>
<p><strong>Reduce the design team</strong> &#8211; One of the biggest causes of a web site going from a professional look to a amateur look is when too many people are involved in the design. If they all read and obeyed the rest of the tips, then this would not be a problem. But at every person&#8217;s review they each want to put their mark on a site and suddenly all manner of tweaks and extras are being added. Cramming all of these banners, dancing cows, splashes of colour and more onto the page that every single one of the committee have added soon destroys the look.</p>
<p><strong>Watch the font size</strong> &#8211; The tiniest reduction of font sizes is sometimes all that is needed to take a site from looking home built to a professional looking website. Use relative font sizes (measured in em) rather than actual font sizes and if the visitor needs larger text they can click a button in their browser to increase it. But large font sizes that shout out to the visitor do not look professional. Sadly, quite often that means the default font size (especially in Arial font) does not look good.</p>
<p><strong>Don&#8217;t get carried away with colours</strong> &#8211; It may be clever to add in lots of blocks of different colours, but it does not look great. Keep to a few simple looking colour blocks nicely positioned around the page.</p>
<p><strong>Use professional images</strong> &#8211; Sorry, but snaps taken on the camera of your mobile phone might look good, but buying some images from a top quality stock photography directory (I use iStockPhoto) gives such an excellent finish to the website that it is well worth the small amount that you pay.</p>
<p><strong>Don&#8217;t think movement is a good thing</strong> &#8211; Lots of movement is never good, not on a website. One or two small, smooth flash animations can add to the page, for example on the header, but placing lots of clever banners, snowflakes falling down the screen, light bulbs that glow and fade and so on will almost always look tacky.</p>
<p>In short, to make a website look professional try to not be too clever. Just because you have learnt how to add a scrolling image does not mean you have to. Use clever tricks only when absolutely needed and do not try to show off with tricks. Your website design will do the showing off for you.</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fwebsite-design-secrets-tips-to-making-a-website-look-professional%2F&amp;title=+Website+Design+Secrets+-+Tips+to+Making+a+Website+Look+Professional" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fwebsite-design-secrets-tips-to-making-a-website-look-professional%2F&amp;title=+Website+Design+Secrets+-+Tips+to+Making+a+Website+Look+Professional" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fwebsite-design-secrets-tips-to-making-a-website-look-professional%2F&amp;title=+Website+Design+Secrets+-+Tips+to+Making+a+Website+Look+Professional" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fwebsite-design-secrets-tips-to-making-a-website-look-professional%2F&amp;headline=+Website+Design+Secrets+-+Tips+to+Making+a+Website+Look+Professional" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=+Website+Design+Secrets+-+Tips+to+Making+a+Website+Look+Professional&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fwebsite-design-secrets-tips-to-making-a-website-look-professional%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=+Website+Design+Secrets+-+Tips+to+Making+a+Website+Look+Professional&amp;u=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fwebsite-design-secrets-tips-to-making-a-website-look-professional%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=+Website+Design+Secrets+-+Tips+to+Making+a+Website+Look+Professional&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fwebsite-design-secrets-tips-to-making-a-website-look-professional%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=+Website+Design+Secrets+-+Tips+to+Making+a+Website+Look+Professional&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fwebsite-design-secrets-tips-to-making-a-website-look-professional%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=+Website+Design+Secrets+-+Tips+to+Making+a+Website+Look+Professional&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fwebsite-design-secrets-tips-to-making-a-website-look-professional%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fwebsite-design-secrets-tips-to-making-a-website-look-professional%2F&amp;title=+Website+Design+Secrets+-+Tips+to+Making+a+Website+Look+Professional&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fwebsite-design-secrets-tips-to-making-a-website-look-professional%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fwebsite-design-secrets-tips-to-making-a-website-look-professional%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fwebsite-design-secrets-tips-to-making-a-website-look-professional%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.janric.co.uk/blog/index.php/coding-tips/website-design-secrets-tips-to-making-a-website-look-professional/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Best Practices of Page Navigation in Website Design</title>
		<link>http://www.janric.co.uk/blog/index.php/coding-tips/best-practices-of-page-navigation-in-website-design/</link>
		<comments>http://www.janric.co.uk/blog/index.php/coding-tips/best-practices-of-page-navigation-in-website-design/#comments</comments>
		<pubDate>Mon, 19 Jul 2010 19:49:06 +0000</pubDate>
		<dc:creator>Keith</dc:creator>
				<category><![CDATA[Building Websites]]></category>
		<category><![CDATA[Coding Tips]]></category>

		<guid isPermaLink="false">http://www.janric.co.uk/blog/?p=1146</guid>
		<description><![CDATA[Getting the page navigation correct in your website design is critical. Get it wrong and your visitors and the search engines cannot find their way around the site. Get it right and you will have a well optimised site in which visitors can find what they want. There are many views of best practices for [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Getting the page navigation correct in your website design is critical. Get it wrong and your visitors and the search engines cannot find their way around the site. Get it right and you will have a well optimised site in which visitors can find what they want.</strong></p>
<p><img src="http://sample.janric.co.uk/resizestock.asp?pic=Fotolia_232268_XS.jpg&width=250" style="float:right; margin-left:10px;">There are many views of best practices for page navigation in your website design. But there should be two main aims of getting your page navigation correct &#8211; allowing visitors to find their way quickly and easily around the website and allowing the search engines to find all relevant pages of your website.</p>
<p>If you only have a small site, half a dozen pages or so, then it is quite easy to display links to all of your pages on every page. But even then, there are mistakes that people can make so do read on!</p>
<p><strong>Keep the main navigation constant</strong><br />
And the first of these is changing the navigation layout on every page. If the navigation structure changes on every page it can be very distracting to the visitors. For example, dropping the current page from the list of links can alter the layout of the links across the screen and if a visitor is working left to right through the links that can cause them to get lost.</p>
<p><strong>Do not hide in text links</strong><br />
Links in text are also open to major problems. I have seen websites in which these links are in exactly the same font, text decoration and size as the rest of the text. This is a shame as visitors on the site will not realise that they can click a link for further information unless by some fluke they happen to drop the mouse over the hidden link.</p>
<p><strong>Always have text links</strong><br />
I am not saying that all links must be text links, but if you are using flash, javascript or image links then at the footer of the page add text link equivalents to the pages that you are linking to. This makes sure that visitors using browsers that can not read these technologies, such as disabled and basic mobile browsers, still have the option for the links as do search engines.</p>
<p><strong>Give a link back home</strong><br />
Quite often someone finding a page on your website will want to go to your home page before continuing through the site, or another visitor might be deep into the website and want to get to your home page. So make sure that this link is clear and easy to find.</p>
<p><strong>Leave breadcrumbs</strong><br />
If you have a website of just a few pages then maybe not needed, but if visitors can click down through several levels of pages then telling them where they are is a must. The breadcrumbs would usually provide another link to the home page and the pages above the current page. For example, on an ecommerce website they might list home page, category page, sub category page and then display the current page name for confirmation.</p>
<p>You might have other ideas for navigation best practices in website design &#8211; if so then please do leave a comment.</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fbest-practices-of-page-navigation-in-website-design%2F&amp;title=+Best+Practices+of+Page+Navigation+in+Website+Design" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fbest-practices-of-page-navigation-in-website-design%2F&amp;title=+Best+Practices+of+Page+Navigation+in+Website+Design" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fbest-practices-of-page-navigation-in-website-design%2F&amp;title=+Best+Practices+of+Page+Navigation+in+Website+Design" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fbest-practices-of-page-navigation-in-website-design%2F&amp;headline=+Best+Practices+of+Page+Navigation+in+Website+Design" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=+Best+Practices+of+Page+Navigation+in+Website+Design&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fbest-practices-of-page-navigation-in-website-design%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=+Best+Practices+of+Page+Navigation+in+Website+Design&amp;u=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fbest-practices-of-page-navigation-in-website-design%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=+Best+Practices+of+Page+Navigation+in+Website+Design&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fbest-practices-of-page-navigation-in-website-design%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=+Best+Practices+of+Page+Navigation+in+Website+Design&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fbest-practices-of-page-navigation-in-website-design%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=+Best+Practices+of+Page+Navigation+in+Website+Design&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fbest-practices-of-page-navigation-in-website-design%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fbest-practices-of-page-navigation-in-website-design%2F&amp;title=+Best+Practices+of+Page+Navigation+in+Website+Design&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fbest-practices-of-page-navigation-in-website-design%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fbest-practices-of-page-navigation-in-website-design%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fbest-practices-of-page-navigation-in-website-design%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.janric.co.uk/blog/index.php/coding-tips/best-practices-of-page-navigation-in-website-design/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Design &#8211; The Best (Tried &amp; True) Fonts For Websites</title>
		<link>http://www.janric.co.uk/blog/index.php/new-websites/web-design-the-best-tried-true-fonts-for-websites/</link>
		<comments>http://www.janric.co.uk/blog/index.php/new-websites/web-design-the-best-tried-true-fonts-for-websites/#comments</comments>
		<pubDate>Mon, 07 Jun 2010 07:53:48 +0000</pubDate>
		<dc:creator>Keith</dc:creator>
				<category><![CDATA[Coding Tips]]></category>
		<category><![CDATA[Discussion]]></category>
		<category><![CDATA[New Websites]]></category>

		<guid isPermaLink="false">http://www.janric.co.uk/blog/?p=1015</guid>
		<description><![CDATA[What are the best fonts to use if you are building a new website? Are fancy, curly, eye catching fonts the best, or the plain and boring standard fonts? Frequently when I am building a website after the customer has looked at a few revisions, the topic of conversation drifts to the fonts that should [...]]]></description>
			<content:encoded><![CDATA[<p><em><strong>What are the best fonts to use if you are building a new website? Are fancy, curly, eye catching fonts the best, or the plain and boring standard fonts?</strong></em></p>
<p><img src="http://www.janric.co.uk/blog/images/fonts.jpg" align="right">Frequently when I am building a website after the customer has looked at a few revisions, the topic of conversation drifts to the fonts that should be used on the website. This is the time that the fun really starts to begin! Usually the customer has been browsing around Word on their machine and playing with a few fonts there. So the question is put, &#8220;Can we have ultra curly school boy graffiti font for all of the headings and&#8230;&#8221;.</p>
<p>Stop right there! Go no further. The problem is that whilst this font might look stunning on your website, what will it look like when your customers visit your website? And here is the problem and it is preceded with a technical explanation.</p>
<p>When you open a website the style sheets dictate what fonts, or font families, should be used within the various areas of the webpage that you are opening. But all that this code does is to refer the browser to the list of font that you already have installed on your machine. So if you have installed <strong>ultra curly school boy graffiti</strong> on your machine then you will be able to see that font when you open the page. But, if this ultra fancy font is not installed on your machine, then the default will be used.</p>
<p>So to be safe, when planning what fonts to use on the various elements of the page it is safest to stick to just those fonts that are installed on the majority of machines and will appear roughly the same. Here we are looking at not only the different versions of Windows machines, but also Macs.</p>
<p>This means that the list of fonts that are compatible with the majority of users is very limited. There are plenty of sites that list most of them and allow you to see what they will appear as, but the choice is very limited.</p>
<p>Which is why we then get to a list of standard fonts that we see in use on sites time and time again. Arial, Times New Roman, Verdana, Garamond and so on.</p>
<p>Sadly, this list does mean that the fonts we get to play with are not that exciting, but if you want to be displaying the page as text, then that is the rule that we have to abide by. But, there are alternatives. For example, if you are designing banners, logos and other elements of the page then these can be created as images on your computer and this gives you the freedom to experience any font that you can find on the internet. The downside &#8211; well images are not accessible to search engines and accessible readers, so the content of the page cannot really depend on such techniques.</p>
<p>You could use graphics for headers and supply an alt attribute for search engines and those unable to read the graphics if you are desperate to use a fancy font. But, aside from this cheat, the best fonts to use when you are creating a website are those boring and frequently used fonts listed above.</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fnew-websites%2Fweb-design-the-best-tried-true-fonts-for-websites%2F&amp;title=Web+Design+-+The+Best+%28Tried+%26+True%29+Fonts+For+Websites" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fnew-websites%2Fweb-design-the-best-tried-true-fonts-for-websites%2F&amp;title=Web+Design+-+The+Best+%28Tried+%26+True%29+Fonts+For+Websites" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fnew-websites%2Fweb-design-the-best-tried-true-fonts-for-websites%2F&amp;title=Web+Design+-+The+Best+%28Tried+%26+True%29+Fonts+For+Websites" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fnew-websites%2Fweb-design-the-best-tried-true-fonts-for-websites%2F&amp;headline=Web+Design+-+The+Best+%28Tried+%26+True%29+Fonts+For+Websites" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Web+Design+-+The+Best+%28Tried+%26+True%29+Fonts+For+Websites&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fnew-websites%2Fweb-design-the-best-tried-true-fonts-for-websites%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Web+Design+-+The+Best+%28Tried+%26+True%29+Fonts+For+Websites&amp;u=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fnew-websites%2Fweb-design-the-best-tried-true-fonts-for-websites%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Web+Design+-+The+Best+%28Tried+%26+True%29+Fonts+For+Websites&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fnew-websites%2Fweb-design-the-best-tried-true-fonts-for-websites%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Web+Design+-+The+Best+%28Tried+%26+True%29+Fonts+For+Websites&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fnew-websites%2Fweb-design-the-best-tried-true-fonts-for-websites%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Web+Design+-+The+Best+%28Tried+%26+True%29+Fonts+For+Websites&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fnew-websites%2Fweb-design-the-best-tried-true-fonts-for-websites%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fnew-websites%2Fweb-design-the-best-tried-true-fonts-for-websites%2F&amp;title=Web+Design+-+The+Best+%28Tried+%26+True%29+Fonts+For+Websites&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fnew-websites%2Fweb-design-the-best-tried-true-fonts-for-websites%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fnew-websites%2Fweb-design-the-best-tried-true-fonts-for-websites%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fnew-websites%2Fweb-design-the-best-tried-true-fonts-for-websites%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.janric.co.uk/blog/index.php/new-websites/web-design-the-best-tried-true-fonts-for-websites/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What Screen Resoutions Should We Be Designing For?</title>
		<link>http://www.janric.co.uk/blog/index.php/new-websites/what-screen-resoutions-should-we-be-designing-for/</link>
		<comments>http://www.janric.co.uk/blog/index.php/new-websites/what-screen-resoutions-should-we-be-designing-for/#comments</comments>
		<pubDate>Sat, 29 May 2010 11:09:33 +0000</pubDate>
		<dc:creator>Keith</dc:creator>
				<category><![CDATA[Coding Tips]]></category>
		<category><![CDATA[Discussion]]></category>
		<category><![CDATA[New Websites]]></category>
		<category><![CDATA[Stats Reviews]]></category>
		<category><![CDATA[Visitor Trending]]></category>
		<category><![CDATA[reviews]]></category>
		<category><![CDATA[screen resolution]]></category>

		<guid isPermaLink="false">http://www.janric.co.uk/blog/?p=985</guid>
		<description><![CDATA[Long ago the 800 X 600 screen was the norm. Even last year, it was highly prevalent and websites had to be designed for it as well as 1600 pixel wide screens. This meant either an expanding screen to fill whatever size screen is being used, which can be problematic, or a narrow 800 pixel [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://sample.janric.co.uk/resizestock.asp?pic=5314427.jpg&width=250" align="right"><em><strong>Long ago the 800 X 600 screen was the norm. Even last year, it was highly prevalent and websites had to be designed for it as well as 1600 pixel wide screens. This meant either an expanding screen to fill whatever size screen is being used, which can be problematic, or a narrow 800 pixel wide screen plonked in the middle of the screen.</strong></em></p>
<p>But, times move on and so do screens. I have been analysing traffic over 6 different websites of my own over a short period this month. These include technical, travel, sport and home interest sites, giving a spread of interests. The totals are:<br />
<center></p>
<table style="height: 322px; text-align:left;" width="375">
<tbody style="font-size:0.7em;">
<tr>
<th>Screen Size</th>
<th>Visits</th>
<th>Percentage</th>
</tr>
<tr>
<td>1024 X 768</td>
<td>994</td>
<td>23.4%</td>
</tr>
<tr>
<td>1280 X 800</td>
<td>897</td>
<td>21.1%</td>
</tr>
<tr>
<td>1280 X 1024</td>
<td>568</td>
<td>13.4%</td>
</tr>
<tr>
<td>1440 X 900</td>
<td>355</td>
<td>8.4%</td>
</tr>
<tr>
<td>1366 X 768</td>
<td>262</td>
<td>6.2%</td>
</tr>
<tr>
<td>1680 X 1050</td>
<td>241</td>
<td>5.7%</td>
</tr>
<tr>
<td>1920 X 1200</td>
<td>124</td>
<td>2.9%</td>
</tr>
<tr>
<td>1024 X 600</td>
<td>89</td>
<td>2.1%</td>
</tr>
<tr>
<td>1152 X 864</td>
<td>81</td>
<td>1.9%</td>
</tr>
<tr>
<td>1920 X 1080</td>
<td>63</td>
<td>1.5%</td>
</tr>
<tr>
<td>1280 X 960</td>
<td>57</td>
<td>1.3%</td>
</tr>
<tr>
<td>1600 X 900</td>
<td>56</td>
<td>1.3%</td>
</tr>
<tr>
<td>800 X 600</td>
<td>56</td>
<td>1.3%</td>
</tr>
<tr>
<td>1280 X 768</td>
<td>56</td>
<td>1.3%</td>
</tr>
<tr>
<td>1280 X 720</td>
<td>37</td>
<td>0.9%</td>
</tr>
<tr>
<td>Other</td>
<td>315</td>
<td>7.4%</td>
</tr>
</tbody>
</table>
<p></center></p>
<p><em style="font-size:0.8em"><strong>Note:</strong> All &#8216;other&#8217; sizes were larger than 1024 X 768.</em></p>
<p>So, what do I make of this? Well the old, reliable, 800 X 600 screen size is dieing off. Down in 13th place in my chart, with less than 1.5% of visitors to these sites using that resolution. The next smallest size I saw was 1024 X 768, most popular overall and in all but one of the sites, the most popular per site, averaging almost 1 in 4 visitors.</p>
<p><strong>Bye, bye 800 X 600</strong><br />
I think that as the year progresses, we are going to see that stats falling for the 800 X 600 screen size. It is obviously no longer popular and as people move to laptops and netbooks with built in screens, those sizes are becoming more the norm.</p>
<p><strong>1024 X 768 rolls onwards</strong><br />
But, the traditional 1024 X 768 still rules the waves! One site did see it in second place, just, and that was the sport site. And this does give a major clue as to where the bigger screen sizes are being rolled out.</p>
<p>The more business orientated sites are showing as many visitors using a 1024 X 768 screen as 1280 X 800 and 1280 X 1024 put together. But, the interest based sites see that gap gone, with almost parity across the three sites. This implies that business is being slow to update to the bigger screen that home users are enjoying. At home, you are likely to have a 1280 screen.</p>
<p><strong>Affecting our design decisions</strong><br />
So, how does this information affect the way that we should be designing websites? Well, I think it is near enough safe to say that when we design a page, we no longer need to stick to 800 pixels wide. We can now safely fill the 1024 screen width and allow for a padding of up to almost 900 pixels on the width!</p>
<p>As for depth, almost 3.5% of visitors were using only 600 pixel deep screens. If something cannot scroll (popup windows etc) then I would think that this is enough visitors to make you stick to that size. But, then the rest can see 768 pixels, so if we design on a 1024 X 768 screen we see the majority.</p>
<p><strong>The future is the exception</strong><br />
However, there is one major exception that I have intentionally overlooked in all of these. One slight little white lie in the table above. On one website, hidden in the top 20 screen resolutions, was a small screen size of a mobile device. So our desktop computers might be getting bigger screens, but what about our mobile computing!</p>
<p>Food for thought.</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fnew-websites%2Fwhat-screen-resoutions-should-we-be-designing-for%2F&amp;title=What+Screen+Resoutions+Should+We+Be+Designing+For%3F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fnew-websites%2Fwhat-screen-resoutions-should-we-be-designing-for%2F&amp;title=What+Screen+Resoutions+Should+We+Be+Designing+For%3F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fnew-websites%2Fwhat-screen-resoutions-should-we-be-designing-for%2F&amp;title=What+Screen+Resoutions+Should+We+Be+Designing+For%3F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fnew-websites%2Fwhat-screen-resoutions-should-we-be-designing-for%2F&amp;headline=What+Screen+Resoutions+Should+We+Be+Designing+For%3F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=What+Screen+Resoutions+Should+We+Be+Designing+For%3F&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fnew-websites%2Fwhat-screen-resoutions-should-we-be-designing-for%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=What+Screen+Resoutions+Should+We+Be+Designing+For%3F&amp;u=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fnew-websites%2Fwhat-screen-resoutions-should-we-be-designing-for%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=What+Screen+Resoutions+Should+We+Be+Designing+For%3F&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fnew-websites%2Fwhat-screen-resoutions-should-we-be-designing-for%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=What+Screen+Resoutions+Should+We+Be+Designing+For%3F&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fnew-websites%2Fwhat-screen-resoutions-should-we-be-designing-for%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=What+Screen+Resoutions+Should+We+Be+Designing+For%3F&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fnew-websites%2Fwhat-screen-resoutions-should-we-be-designing-for%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fnew-websites%2Fwhat-screen-resoutions-should-we-be-designing-for%2F&amp;title=What+Screen+Resoutions+Should+We+Be+Designing+For%3F&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fnew-websites%2Fwhat-screen-resoutions-should-we-be-designing-for%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fnew-websites%2Fwhat-screen-resoutions-should-we-be-designing-for%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fnew-websites%2Fwhat-screen-resoutions-should-we-be-designing-for%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.janric.co.uk/blog/index.php/new-websites/what-screen-resoutions-should-we-be-designing-for/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The easiest form to email script I ever did write!</title>
		<link>http://www.janric.co.uk/blog/index.php/coding-tips/the-easiest-form-to-email-script-i-ever-did-write/</link>
		<comments>http://www.janric.co.uk/blog/index.php/coding-tips/the-easiest-form-to-email-script-i-ever-did-write/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 15:14:24 +0000</pubDate>
		<dc:creator>Keith Lunt</dc:creator>
				<category><![CDATA[Coding Tips]]></category>

		<guid isPermaLink="false">http://www.janric.co.uk/blog/?p=46</guid>
		<description><![CDATA[I got completely fed up recently with writing long form to email scripts, testing them and spending the time to get them working. Quite often a small spelling mistake would lead to failure of something, sometimes going unseen for a while. But then two sites came along at the same time each with several different [...]]]></description>
			<content:encoded><![CDATA[<p>I got completely fed up recently with writing long form to email scripts, testing them and spending the time to get them working. Quite often a small spelling mistake would lead to failure of something, sometimes going unseen for a while.</p>
<p>But then two sites came along at the same time each with several different contact forms, some quite lengthy. It was obviously going to take a few hours to code them all up, so that became a few hours that could be better spent developing a quick and easy solution to roll out to any website almost instantly.</p>
<p>And that is what I achieved. Now, it takes seconds to do the form to email processing! I just copy in a standard send.php page, change the destination email and the job is done!</p>
<p>I&#8217;ve been sharing this with a few customers who maintain their own sites, so I thought why not share it further? So I am documenting it here for all to use.</p>
<p>It is not that clever and not that long. The only requirement, apart from needing some version of PHP, is that the form is submitted with the method=&#8221;POST&#8221;. Then it does everything else the same. Just give the fields names that are meaningful and this little script will do the rest.</p>
<p>Just cut and paste the code below into the top of a PHP thank you page, change the $site_email to your own email and it should work! Simple as that.</p>
<div>
<div>&lt;?php</div>
<div>$message = &#8221;;<br />
foreach ( $_POST as $key  =&gt; $value ) {<br />
$message .= &#8216;&lt;b&gt;&#8217;.$key . &#8220;&lt;/b&gt;&lt;br&gt;&#8221; .  str_replace(&#8220;\r\n&#8221;, &#8220;&lt;br&gt;&#8221;, $value).&#8217;&lt;br&gt;&lt;br&gt;&#8217;;<br />
}</p>
<p>$site_email = &#8216;box@youremail.com&#8217;;</p>
<p>ini_set(&#8220;sendmail_from&#8221;, $site_email);<br />
$subject = &#8216;Website Enquiry Received&#8217;;<br />
$headers = &#8216;From:  &#8216;.$site_email.&#8221;\r\n&#8221; .<br />
&#8216;Content-type: text/html;&#8217;.&#8221;\r\n&#8221;.<br />
&#8216;Reply-To: &#8216;.$site_email. &#8220;\r\n&#8221; .<br />
&#8216;X-Mailer: PHP/&#8217; .  phpversion();</p>
<p>mail($site_email, $subject, $message,  $headers);</p></div>
<div>?&gt;</div>
</div>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fthe-easiest-form-to-email-script-i-ever-did-write%2F&amp;title=The+easiest+form+to+email+script+I+ever+did+write%21" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fthe-easiest-form-to-email-script-i-ever-did-write%2F&amp;title=The+easiest+form+to+email+script+I+ever+did+write%21" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fthe-easiest-form-to-email-script-i-ever-did-write%2F&amp;title=The+easiest+form+to+email+script+I+ever+did+write%21" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fthe-easiest-form-to-email-script-i-ever-did-write%2F&amp;headline=The+easiest+form+to+email+script+I+ever+did+write%21" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=The+easiest+form+to+email+script+I+ever+did+write%21&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fthe-easiest-form-to-email-script-i-ever-did-write%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=The+easiest+form+to+email+script+I+ever+did+write%21&amp;u=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fthe-easiest-form-to-email-script-i-ever-did-write%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=The+easiest+form+to+email+script+I+ever+did+write%21&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fthe-easiest-form-to-email-script-i-ever-did-write%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=The+easiest+form+to+email+script+I+ever+did+write%21&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fthe-easiest-form-to-email-script-i-ever-did-write%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=The+easiest+form+to+email+script+I+ever+did+write%21&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fthe-easiest-form-to-email-script-i-ever-did-write%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fthe-easiest-form-to-email-script-i-ever-did-write%2F&amp;title=The+easiest+form+to+email+script+I+ever+did+write%21&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fthe-easiest-form-to-email-script-i-ever-did-write%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fthe-easiest-form-to-email-script-i-ever-did-write%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fwww.janric.co.uk%2Fblog%2Findex.php%2Fcoding-tips%2Fthe-easiest-form-to-email-script-i-ever-did-write%2F" ><img class="lightsocial_img" src="http://www.janric.co.uk/blog/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.janric.co.uk/blog/index.php/coding-tips/the-easiest-form-to-email-script-i-ever-did-write/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

