mozilla-mobile / firefox-ios

Firefox for iOS
Mozilla Public License 2.0
12.13k stars 2.9k forks source link

iOS Firefox useragent does NOT contain "FxiOS" as Documentation says #6620

Open SimonBasca opened 4 years ago

SimonBasca commented 4 years ago

The page at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent/Firefox clearly notes that all Firefox versions will contain "FxiOS" in their useragent.

This is not the case, as both Firefox and Firefox Focus, contain "FxiOS" nowhere in their useragent.

I'm developing a site that needs to know when a user is using a mobile browser or not. While official Firefox docs indicate this keyword, and I thought it would be perfect for detecting Firefox mobile, it's no where to be found when actually checking the useragent from an iOS device, when using Firefox.

Either change the docs (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent/Firefox) or fix the problem of it not showing in Firefox for iOS.

Developers need keywords that are unique to your mobile browsers. While your docs try to indicate that "FxiOS" is that unique term. It's no where to be found in your actual product.

I believe I had previously reported this problem, the problem was fixed for a few months, and now you've removed the "FxiOS" term again from your mobile useragents. Clearly, developers need some unique term or keyword from Mozilla to signify a visitor is using a mobile.

VIa : https://bugzilla.mozilla.org/show_bug.cgi?id=1638613

┆Issue is synchronized with this Jira Task

athomasmoz commented 4 years ago

Documentation should be updated to reflect that we don't include FxiOS in UA.

ltrung commented 4 years ago

Without the 'FxiOS' in the user agent, is there a way to detect Firefox vs Safari in iOS?

f0dder1024 commented 3 years ago

FxiOS string in user agent does not appear on iPad Pro 12.9inch 3rd Gen (iPadOS 14.4 ) w/Firefox Daylight 32.0 (3841) The expected FxiOS string shows up on iPhone Xs Max (iOS 14.4). w/Firefox Daylight 32.0 (3841)

Perhaps an iPadOS issue?

grantg182 commented 3 years ago

Still an issue in Firefox Daylight 33.0 (4119) 😭

FlowIT-JIT commented 2 years ago

What is the reason for hiding the fact that the browser is Firefox on iPad and not on iPhone and iPod ?

mugurelghflorea commented 2 years ago

Our customers would benefit greatly if our solution could detect if browser is FF. Still an issue for iPad 7th generation, iPadOS 15.5.

carlhemp commented 1 year ago

It would be greatly appreciated if we could also detect the browser is FF on an iPad. I second @FlowIT-JIT's comment on this - is there a reason for this not being standardized with the rest of FF iOS UA strings?

hlopes-ledger commented 1 year ago

One more vote for this, as mentioned the behaviour is inconsistent between iOS and iPadOS.

mriabokliach commented 1 year ago

And here we are 3 years later, at the same place. Still no "FxiOS" in the user agent, even though the MDN docs state the opposite. :man_shrugging:

Using: iPhone SE iOS 16.6 Firefox 116.0

IMG_5858

cpeterso commented 1 year ago

The FxiOS string was recently removed from Firefox iOS's UA string in https://github.com/mozilla-mobile/firefox-ios/pull/15142 because it was causing multiple web compatibility problems (such as https://github.com/mozilla-mobile/firefox-ios/issues/13294).

cpeterso commented 1 year ago

FxiOS is being added back to Firefox iOS's User-Agent string in this PR: https://github.com/mozilla-mobile/firefox-ios/pull/16176

Yukigamine commented 8 months ago

This issue is fixed on iOS Firefox but not iPadOS.

umeshrenlty commented 5 months ago

I am also getting same issue in ipad .Not able to detect browser name it is alawyas giving as safari

cpeterso commented 5 months ago

Because the Firefox UA string doesn't include "FxiOS" on iPad, the ua-parser-ja library mistakenly identifies Firefox as Safari: https://github.com/faisalman/ua-parser-js/issues/709

Safari on iPadOS 17.4: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4 Safari/605.1.15

Firefox 120.4 on iPadOS 17.4: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15