mozilla-mobile / focus-ios

⚠️ Firefox Focus (iOS) has moved to a new repository. It is now developed and maintained as part of: https://github.com/mozilla-mobile/firefox-ios
Mozilla Public License 2.0
1.26k stars 261 forks source link

Focus's desktop User-Agent string (UA) should not include "FxiOS" and "Mobile/15E148" tokens #3054

Open cpeterso opened 2 years ago

cpeterso commented 2 years ago

Steps to reproduce

  1. Load http://my-user-agent.com/
  2. See that the User-Agent string (UA) includes "FxiOS" and "Mobile" tokens, which are appropriate for a mobile browser. I see Mozilla/5.0 (iPhone; CPU iPhone OS 15_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/9000 Mobile/15E148 Safari/605.1.15
  3. Open hamburger menu > Request Desktop Site.

Expected behavior

Focus's desktop UA should look like Safari's desktop UA that doesn't include "FxiOS" or "Mobile", just like Firefox iOS.

Actual behavior

Focus's desktop UA still includes "FxiOS" and "Mobile/15E148", identifying itself as a mobile browser. I see Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/9000 Mobile/15E148 Version/15.0

For comparison:

Device & build information

┆Issue is synchronized with this Jira Task

cpeterso commented 2 years ago

If we are fixing Focus's desktop UA to remove "FxiOS", we should also consider removing "FxiOS" from Focus's default mobile UA. Since Firefox iOS has a smaller market share that Safari iOS, including "FxiOS" in Focus's UA increases its uniqueness and fingerprintability. That's not something a user of a privacy-focused browser would want. Is there any advantage to including "FxiOS" besides advertising Firefox iOS to browser analytics like StatCounter?

cpeterso commented 2 years ago

Note that including FxiOS in Focus's desktop UA means that users won't be able to use Focus's desktop mode to work around websites broken by a three-digit version number like FxiOS/100.0 in Focus's mobile UA. Firefox iOS v100 will ship in May 2022.

Since Firefox iOS's desktop UA looks like an older Safari version and doesn't include FxiOS, Firefox users can use desktop mode to access websites that might be broken by FxiOS/100.0 in Firefox iOS's mobile UA.

cpeterso commented 1 year ago

This issue is about Focus's desktop UA string, but to improve web compatibility, Focus's mobile UA string should probably include Safari's Version/ token. See mozilla-mobile/firefox-ios#11464 for more information.

rtestard commented 1 year ago

To sum things-up here re the suggested changes:

@jevans-mozilla Do you recall what may have driven the addition of "FxiOS" on the UA string?