Reply to Re: Browser detect problem

Your name:

Reply:


Posted by Michael Winter on 06/12/06 18:11

On 07/06/2006 20:06, KoRnDragon wrote:

> I'm using a script to detect which browser is using [...]

Server-side? Good grief! It's bad enough trying to perform browser
detection client-side.

> in order to include the correct stylesheet but on this one page
> (http://korndragon.com/ffa5.php)

You would be better off rewriting that to trigger 'Standards' mode
(preferably by using, and authoring to, the Strict HTML document type),
and writing both valid markup and CSS (you have managed neither). Use a
decent browser like Opera or Firefox, and fix-up as necessary for IE.

If you rely on browser quirks to render your site, you are bound to
encounter problems. Writing different style sheets for various browsers
requires unnecessary effort, makes ongoing maintenance more taxing, and
you have no chance of coping with all user agents that might visit your
site. The point of conforming with interworking standards and guidelines
is to eliminate all of that[1].

[snip]

> The source: http://www.sitepoint.com/article/browsers-suck-php-rescue

Browser detection is unreliable, especially server-side. User agents
spoof others; Microsoft started it all. It is an inescapable fact.
Making a site functionally dependent upon browser detection is a serious
mistake.

[snip]

Mike


[1] I don't pretend that conforming to standards is a panacea,
but it is surely a better starting point than browser
detection, or writing unnecessary hacks.

--
Michael Winter
Prefix subject with [News] before replying by e-mail.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация