1. Computing

Discuss in my forum

Browser Specific Web Designs

Why Should You Care

By

One of the reasons that I like writing HTML is that it keeps changing. I am always challenged to learn more and more. It isn't like ordinary writing, there I just have to know the latest key strokes in Word Perfect to get the text justified, but knowing that won't help improve my prose. HTML allows me to write, design page layout, write scripts, and learn new ways of doing it all the time, and I can hope that if I do learn more my pages will look better.

On my own site, I don't write pages for specific browsers. I don't want to drive customers away, I like to learn about advances across the board, and I like to modify HTML.

Why Should I Care? They Should Use Internet Explorer / Firefox / Safari to View My Page!

I just checked the logs at my work and around 5% of the people who hit our pages use something other than Internet Explorer. So why should I design for anything other than IE?

What this means is that if I design pages that only view nicely in standards compliant browsers, like Firefox, I may mess up the pages for most of my viewing audience. It's like you have gone to a restaurant wearing slacks and a nice shirt and the stuffy maitre'd won't allow you in. "Sir, you are not allowed in without a jacket and tie." It's not like you're dressed badly. Your clothes look nice and you could get a job in California without a problem, but they won't let you in.

However... most restaurants of this nature will provide coats and ties for rent to those customers who didn't wear them. They don't want to turn away your business. The maitre'd would be more likely to say "Excuse me, sir, but would you care to examine our selection of jackets?" than to just kick you out.

Don't Turn Customers Away

If that snooty restaurant isn't turning customers away, why are you? The most user friendly thing to do is to create HTML pages that are best viewed with any browser. However, I can understand the lure of designing for just one browser. After all, then you only need to test once. It's easy.

But what about when IE 7 comes out? It is standards compliant and many of the tricks you've created for IE 6 and below won't work any more. So you're just making more work for yourself in the future.

Standards-Based Pages Are Best

The point of standards is that you can rely on them to stay the same, or at least be backwards compatible. When you build a standards compliant page, you're building a page for the future - that will last no matter what browsers come along.

But if You Must Design for One Browser - Provide Options

The best way to get viewers to leave your page and never return is to put a message telling them to download your favorite browser now. Why not instead make them want the latest and greatest by giving them the information on your page, while implying (subtly) that they might get more with another browser?

I do this with Javascript and meta refresh tags. If I want to use layers or marquee on my pages, I put the following code on the front page of the site:

<meta http-equiv=refresh content="2;http://YOUR URL HERE/standard.html">
 
 . . .
 
 <script language=javascript>
 <!-- manufacturer=navigator.appName;
 version=navigator.appVersion;
 
 // Communicator
 if (manufacturer.indexOf('Netscape')>=0 &&
 version.indexOf('4.0')>=0)
 location.href='/nc4_index.html';
 
 // IE4
 if (manufacturer.indexOf('Microsoft')>=0 &&
 version.indexOf('4.0')>=0)
 location.href='/ie4_index.html';
 
 // 3.x browsers
 if (version.indexOf('3.0')>=0)
 location.href='/v3_index.html'; -->
 </script>
 
 <noscript>
 Your browser does not support scripting. However, we do have a <a href="/standard.html">special area</a> of our site for you to visit.
 </noscript>

The first line refreshes the page after 2 seconds to the standard version of my site. This page generally has very little in the way of special effects, but it does have all the same information.

The javascript looks at the browser type and shows you a page optimized for your browser (Netscape 4.0 -- nc4_index.html, IE 4.0 -- ie4_index.html, and other 3.0 browsers -- v3_index.html).

Finally, if your browser doesn't support javascript or meta-refresh, you see my message in the <noscript> area that points you to the standard version of the site.

It is subtle, because only the URL tells them that there might be other versions. I might put specific browser logos on the pages that I've written for, but I would never tell anyone that their browser is not the best.

Previous Features

©2014 About.com. All rights reserved.