1

Is it possible from $_SERVER['HTTP_USER_AGENT'] to determine the browser name and it CSS support.

1 Answer 1

3

Yes, but I wouldn't recommend doing it yourself. That user agent string is notoriously fickle. Some browsers send it one way, other versions of the same browser send it another. It's a mess to try to keep track of yourself.

I would recommend going with a library that can do this for you. Here's one from the CodeIgniter framework I use: http://ellislab.com/codeigniter/user-guide/libraries/user_agent.html

There are probably many, many others. This is a pretty commonly-done thing, so there's lots of solutions for it already.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.