PHP Tips
If you're putting form variables in a URL, you can get into strife when the user enters spaces or other non-alphanumeric characters in the form. The way to convert their data to a URL compliant format is as follows...
Read More

CSS Tips
You can change the colour of your browser's scrollbar (only works for IE 5.0 and above) by defining a style in your HTML header...
Read More



Quality Web Hosting
Business Directory

Web Design Tips

Protecting the content of include files

A common practice in web design is to put repeated content (such as headers, footers, functions, etc) into a separate file then include it in all your webpages. However, using an extension such as .txt or .inc means if someone guesses the filename, they can view the contents of your file. This is particularly dangerous if you have sensitive info such as passwords or php code you don't want publically available. A way to protect this is to use the .php or .asp extension (depending on your server). If anyone views the page directly, all your code is executed and not visible to the end user.

Avoid spaces in your URLs

Technically, a URL cannot have a space in it. Most modern browsers compensate by replacing any spaces with %20 and the page loads fine. However, there are two good reasons not to use spaces in your filenames or folders. Obviously, if many browsers can view them, it follows that there are others, mostly older ones, that don't (I'm not aware of exact figures but if anyone does know, I'd love to hear from you). Why alienate a portion of your visitors for no good reason? Secondly and more significantly, some web crawlers are unable to index pages with spaces in the URL meaning the page won't be listed in some search engines. You have to remember that most crawlers have the functionality of a primitive browser. To get around this, use the simple method of using underscores "_" or hyphens "-" in your URLs instead of spaces.

Underscores versus hypens in your URLs

There are various arguments on whether to use underscores "_" or hypens "-" as dividers in your URLs - most of them aesthetic. However, to my way of thinking, one fact decides the whole argument. Google sees hyphens as dividers, it ignores underscores. This means it's more likely to extract keywords out of your domain, directories and filenames if you use hyphens to separate your keywords, and hence your webpage will rank higher when searching for those keywords.

Web site design and development, seo service::Buy Chairs::Buy Flowers::Amazing Picture::Gary Winnick::SEO Sydney
 

© Copyright 2006 GreatWebMasterWorld.com All Rights Reserved.| Free Smiley Packs | Idip Directory Bid | Motor Sports Blog