Search code examples
androidfirefoxmobileuser-agent

What is the Android Firefox user agent string?


What is the Android Firefox user agent string?

Like:

iPhone:

Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25

iPad:

Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25

Solution

  • Mozilla/5.0 (Android 4.4; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0
    Mozilla/5.0 (Android 11; Mobile; rv:86.0) Gecko/86.0 Firefox/86.0
    

    The platform part of the UA string indicates if Firefox is running on a phone-sized or tablet device. When Firefox runs on a device that has the phone form factor, there is a Mobile; token in the platform part of the UA string.

    When Firefox runs on a tablet device, there is a Tablet; token in the platform part of the UA string instead. For example:

    Mozilla/5.0 (Android 4.4; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0
    Mozilla/5.0 (Android 4.4; Tablet; rv:41.0) Gecko/41.0 Firefox/41.0
    

    The version numbers are not relevant. Avoid inferring materials based on these.

    https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent/Firefox#Mobile_and_Tablet_indicators