How would I go about doing a detect to see if the browser is either firefox, ie (but not ie6), opera, chrome or safari by using feature detection?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Feature detection is not supposed to tell you which browser the user is using. It is meant to tell you if the browser can handle what you need to do.
So for instance, if you need to support ActiveX, you might check
This is better than checking if the browser is IE because some other browser (current or future) might support ActiveX too.
A more useful example may be text node checking when traversing a node list.