How To Detect The User's Browser With JavaScript

preview_player
Показать описание
In this tutorial, you'll learn a few different approaches to detecting the user's browser in JavaScript.

Browser detection isn't a particularly reliable task in JavaScript simply because a lot of the data available to the JavaScript engine and web APIs can be spoofed or modified.

In the video, we'll cover several different approaches:

00:33 User-agent sniffing
02:26 Feature detection
03:58 Operating system detection
04:21 Mobile or touchscreen interface detection

You will see the problem with user-agent sniffing and why it isn't a great solution for browser detection. Then we'll take a look at how you can detect whether a browser supports a particular feature before finally looking at operating system detection and mobile detection. Channel Handle @codebubb
Рекомендации по теме
Комментарии
Автор

You'd think this topic would be much more straight forward. I wonder why the user agent string on chrome also contains Mozilla and Safari. Anyways, using the detectJS library seems to fit my needs.

dereknop
visit shbcf.ru