What is the most efficient way to determine what browser is being used...

So

Lifer
Jul 2, 2001
25,923
17
81
I'm trying to determine which browser my enduser is using, so that I can load the appropriate stylesheet....is there any efficient way to do this?

I tried PHP's get_browser function, but, it spits back "browscap ini directive not set" (which, I assume, means that I'd have to get the server owner to install it)...I figured I'd look for a better way first.

Thoughts?
 

screw3d

Diamond Member
Nov 6, 2001
6,906
1
76
Try echo $_SERVER['HTTP_USER_AGENT'] and see if you get anything useful? Javascript will work too, but then you'll have to make the browser download all stylesheets since it's client-side..

[zealot]It'll be better if you forego this entirely ;)[/zealot]