Hello!
> I guess most people don't care if their HTML validates
I care about validation and I think that I would solve this kind of
problem by moving browser sniffing to the level of server configuration,
such as writing in an ./.htaccess file:
RewriteEngine on
RewriteBase /somePath
RewriteCond %{HTTP_USER_AGENT} someBrowser [OR]
RewriteCond %{HTTP_USER_AGENT} someOtherBrowser
RewriteRule ^fileName$ - [L,T=foo/baz]
or
RewriteRule ^fileName$ otherFileName [NC,R=301]
or the like (depending on your needs) ...
I hope this helps.
Regards!
SaaĊĦha,
|