No WWW.

Posted in Article tagged with seo Wed 23 Sep 2009 9:30 am

At launch, my homepage joined the ranks of those trying to rid the net of a deprecated convention, and decided against the www.

Why is the www. deprecated? Well, it just isn’t necessary, as the people at No-WWW. explain:

Mail servers do not require you to send emails to recipient@mail.domain.com. Likewise, web servers should allow access to their pages though the main domain unless a particular subdomain is required.

So if the www. is deprecated, what are the benefits of not using it? Well, none. The most important thing is that you CHOOSE TO USE IT OR NOT and then stick to it. The problem arises with search engine optimisation, as Canonical SEO explains. A search engine may well list your homepage twice, once with the www. and once without. This is bad for your page rank, because the more inbound links to your site, the higher your rank. With your links potentially being split between two pages, your site will appear lower in search listings.

This problem can easily be remedied, all by adding three lines to your .htaccess file that will direct all the traffic from the www. site to the non-www. site or visa-versa. The .htaccess file is an Apache configuration file located in the root directory of your website. You can edit it through your FTP program. It may be hidden, much like a hidden file on a PC, so go to your FTP program’s settings and find and click the box that says “Show hidden files and folders” or similar.

To always remove the www. add this.

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

To always use the www. add this after changing “example.com” to your own URL.

RewriteEngine On
RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]

Whether you choose www. or not is up to you. But, answer me this. When was the last time you said the www. whilst discussing a website? Or saw it on an ad? Or typed it into your browser? Without it, devilishly clever URLs have been created, such as http://del.icio.us and http://tr.im. And don’t forget, www is the most inefficient abbreviation ever. It has three times the syllables (nine) than the phrase it is an acronym of (three).

Sloppily typed by Nick Pyett


Click to suit your screen

Posted in Tutorial tagged with css, javascript Thu 25 Jun 2009 2:05 pm

Fixed and variable width CSS layouts both have their strengths and weaknesses, and have each been adopted widely, but there is a third way.

Paul Sowdens’s “style-switcher” article on A List Apart describes (with a little help from PPK) how to use alternate style sheets and Javascript to let a user switch between the style sheets applied to a web page. The most widely known use of this technique is probably Wired.com’s text size widget, where by clicking on a smaller or larger text icon changes the size of the article text.

As the style-switcher technique allows us to switch between whole style sheets, it is not just the text size a user can be allowed to adjust. By the same token, whatever styles we put into our alternate style sheet will override the styles set out in the persistent or preferred style sheets, when enabled by the Javascript (as long as they are put in order to cascade properly).

We can now set up multiple alternate style sheets, each with different styles applied, and the user change between them. My homepage is styled with a fixed width of 800px, but a user can click on the links at the top of the right column to change this width to suit their screen, be it a portable device, wide screen or standard.

This approach overcomes the two main issues associated with fixed width layouts, namely, that either they are too wide for your screen and necessitate horizontal scrolling, or, that they look lost in a sea of emptiness on your snazzy high-res screen. It also does not suffer the problem often criticized of variable width solutions; that they can produce paragraph widths too wide as to be comfortable to read. The widths can be chosen and tested before anyone applies them.

And I know what some of you will say before you say it: “If you’re using Javascript anyway, why not just use the screen.width property and match the page width with that?” Good point, but this is just another way of producing a variable width layout. Admittedly, you could then use Javascript to choose between alternate style sheets, but we don’t want Javascript to choose the width of our page - we can do that for ourselves.

There is no reason, however, that one of these methods should not be available to the user, or even set as default. We could have a standard width for the page, for example, and a “match my screen size” button for those who felt the standard width was not appropriate for their screens. What I am proposing is that users should have the choice over how best to view content in their own browsers.

Sloppily typed by Nick Pyett


What is the W3C?

Posted in Tutorial tagged with web, standards Wed 17 Jun 2009 12:27 pm

The World Wide Web Consortium (W3C) is an organisation dedicated to developing standard practices and guidelines to help the internet grow in a positive way.

The W3C produce recommendations about how to best apply a web programming language. Everything from current standards, such as XHTML, the mark-up language this website is coded in, to newer languages, such as Service Modeling Language, a language used to model complex services and systems, are explained in detail. These guidelines are only recommended after the endorsement of W3C members and its Director.

By complying with the W3C recommendations set out for web programming, a web designer can produce sites that are easily accessible to a user and compatible with the range of browsers that are available today. Why should the browser you’re using effect how the web looks? Well, in a perfect world, it shouldn’t, but different browsers support different programming languages to different degrees.

To aid web programmers in complying with the recommendations for HTML, the W3C provide a validator to check a designer’s code against its own guidelines. This service shows errors and warnings if your code does not match the specific guidelines set out for HTML (or XHTML). Validators for CSS, hyperlinks and mobile devices, among others, are also provided.

Membership to the W3C is open to companies and individuals, of which there are over 400. The advantages of membership for a company is to get an early insight into market trends and emerging technologies, not to mention the kudos received for being an innovator within the industry and the networking possibilities.

To give you an idea of the sort of early insight we are talking about, the W3C launched the Mobile Web Initiative, to facilitate mobile web access, in May 2005, over a year and a half before the release of the iPhone. In February 1998, XML, the language used for RSS news feeds and blogs, became a W3C recommendation, five years before Google bought Blogspot.com.

Currently, the W3C is focusing on the tools to bring about a Semantic world wide web. This is a vision of the internet where data is easily accessible to a wide range of applications, rather than the model we have now, where applications control data.

Since its creation in October 1994 by Tim Berners-Lee, the inventor of the internet, the W3C has been at the forefront of the development of the web, and now, with the creation of the Web Science Research Initiative, the goal for the future is to “build synergies between Web Science and Web Standards - to ensure that the Web benefits all people on the planet”. If you are anybody from a web enthusiast to an associate in a large corporation, news from the W3C and its associated bodies is always worth following.

Sloppily typed by Nick Pyett