Skip to content Skip to sidebar Skip to footer

Check If Firefox/firefox Os/firefox For Android

I'm working on a snippet for check if the browser is Firefox/Firefox OS/Firefox for Android. The method for check is the user agent with a little feature detection. I haven't found

Solution 1:

As far as I know, there is no other way to do this, but I would suggest you do features detection when you need to use something specific, instead of using user-agent. As an example, you can use

if (navigator.connection) //Network Information API
if (navigator.battery) // Battery Status API

Or use a library like Modernizr.

Post a Comment for "Check If Firefox/firefox Os/firefox For Android"