View Full Version : To be or not to be....

10-08-2003, 05:14 PM
To be or not to be HTML compliant?

I would like to make my site fully W3C HTML/CSS compliant. No nested tables, no font tags, no bold tags, etc. The result is smaller and better organized files.

Most of my sites visitors are using IE 5 or 6. But, browsers are not compliant and my site still has a few vistors using Netscape 2,3,4 and IE 3, 4. CSS is supposed to degrade gracefully with older browsers, but because of browser bugs and limited support that is not reality.

Is it possible to set up the server so that those with older browsers are automatically sent an alternative page?

So, should I ignore those few vistors with older browsers and go compliant? If not, when?

10-09-2003, 09:53 AM
I use this contruct to keep older browsers that don't support the latest CSS from even trying. The @import isn't supported by netscape 4 and under. Other than that, my site is pretty much text only. Which makes it nicely work in most if not all browsers.

<style type="text/css">
@import url(torrin.css);

10-09-2003, 11:26 AM
If you use PHP pages, then you can have a 'browser sniffer' on the server that serves up pages tailored to the browser that is visiting.

But, its a lot of work and I don't do that. I try to make pages compliant, and if people have older browsers, they should be able to read the information, even if the format sucks. On a recent project we realised that we'd spent over 20% of the budget on tailoring the site for about 2-3% of the visitors, its just not financially worth doing.

We also need to persuade people to upgrade...

10-09-2003, 11:33 AM
I usually use the same technique as torrin. It is unreasonable to want to cater a good-looking design to every possible browser. What is possible is to use CSS to give relatively newer browsers eye-candy while delivering base (unstyled) content to the (very few) older browser-users. People that are using those old browsers probably have limited bandwidth and slow computers too, so sending them text-only is an even better idea. Besides, all their browser probably supports is basic font, colour and background setting/changing. This is why I have moved away from font tags, tables and the like to external style sheets and JavaScript libraries. I employed this principle when I designed www.mirc.org.za - if you want to check it out. Besides bandwidth and compatibility issues, there are many, many benefits that employing this kind of approach to design provide, most common of which is that a site redesign becomes immensly easy to do. Even design tweaks are easy to make - all you need to do is make a change to one file and that's it! I find that using stylesheets also provides you with a lot more control over the presentation of the page as well - many "hidden" properties, etc. that you cannot set with "normal HTML".

As for sending people with "incompliant" browsers elsewhere, would it not be much better to send them your site's content (even if it is text only)? Obviously sending them that much is better than sending them nothing at all. They are probably fed up of "your browser is too old to view this site" messages anyway - sending them your site content without mentioning this would be a breath of fresh air to them. They'd appreciate your site, even if it did look like crap with all the default colours and fonts! ;) Most of the "important" HTML elements would show up anyway - images, lists, etc.

While we are on the topic, I'd like to suggest a couple of sites you should definitely check out:


10-09-2003, 11:39 PM
Thanks everyone.
Lots of good ideas and info, and those links are very helpful Fayez.

10-12-2003, 11:12 PM
Well, that was fun.
I re-coded my site to be more compliant and learned some in the process.
First, IE6 does not use CSS correctly unless the page has the correct DOCTYPE declaired. I always thought that was optional.

I decided not to give CSS to IE3 or NN4. They get normal HTML that looks ok and is usable.
I tested it on IE4, IE5, NN6, and Mozilla 1.2.1. The CSS validates. Most pages validate except ones with Flash or because of validator bugs.

Thanks for the advice I got here and at WebmasterWorld.

10-13-2003, 02:17 PM
Good job, Armadillo! For that Flash thing, you might want to look at this: http://www.alistapart.com/stories/flashsatay/ (you might be able to modify it to match your current DOCTYPE).

10-13-2003, 04:20 PM
Thanks Fayez.
I've tried the "Flash satay" method before, and it works on everything I tested it on. But, doing research on it I discovered reports by some people using Win ME that had trouble with it.

So, I went back to the old way of embeding Flash. The page wont validate because of it, but that doesnt seem to be a real problem.

If anyone here has used the "satay" method, and had no problems, I would be interrested to know.