Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

Browser detection is a code smell. However, there are times you want to detect/identify the browser a user is using as opposed to feature/support-detection. How do you do browser detection in JQuery 2.0 and higher?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
228 views
Welcome To Ask or Share your Answers For Others

1 Answer

You don't do it with jQuery, because it's not a feature of the library anymore.

So you do it with another library, or yourself. All the details about browser detection and the javascript code are at Quirksmode.

But just don't do it, really. What's your use case?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...