Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

user-agent showing up as Safari instead of Mozilla

more options

iPad version: iPadOS 13.5 Firefox version: 25.1 (17865)


The user agent that is returned outputs that I am currently using Safari 13.1 on macOS (Catalina) which is not correct?

I have tested this on other browsers with the same device.

Firefox:

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Safari/605.1.15

Chrome:

Mozilla/5.0 (iPad; CPU OS 13_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/83.0.4103.63 Mobile/15E148 Safari/604.1

Edge:

Mozilla/5.0 (iPad; CPU OS 13_2_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0 EdgiOS/45.3.19 Mobile/15E148 Safari/605.1.15

Safari:

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Safari/605.1.15

iPad version: '''iPadOS 13.5''' Firefox version: '''25.1 (17865)''' The user agent that is returned outputs that I am currently using Safari 13.1 on macOS (Catalina) which is not correct? I have tested this on other browsers with the same device. Firefox: '''Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Safari/605.1.15''' Chrome: '''Mozilla/5.0 (iPad; CPU OS 13_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/83.0.4103.63 Mobile/15E148 Safari/604.1''' Edge: '''Mozilla/5.0 (iPad; CPU OS 13_2_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0 EdgiOS/45.3.19 Mobile/15E148 Safari/605.1.15''' Safari: '''Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Safari/605.1.15'''

Diubah oleh Paul van Dyk

All Replies (4)

more options

I believe that this is the same problem, does Mozilla leverage safari? why does it not return its own user-agent?

Diubah oleh Paul van Dyk

more options

Hi Paul van Dyk, all browsers for iOS are built on top of Safari due to Apple restrictions on third party browser engines.

The convention for Safari on iPad now appears to be to mimic a desktop computer rather than revealing itself to be a mobile device (although I'm sure there are other tells that developers can discover).

Firefox for iOS 25.0 changed to hardcoding the Safari UA. I know users have endured a lot of websites reporting their browser was out-of-date because the version numbering on iOS is much lower than on desktops. That seems to be the motivation for using the Safari UA for now so sites do not need to be fixed to recognize FxiOS is its own thing:

https://github.com/mozilla-mobile/firefox-ios/pull/6468

It's not clear how soon that might be tweaked again.

Is it important that sites recognize the browser as Firefox for iOS?

more options

Yes, it's quite important, for my specific case I need the user agent to render relevant data and modify which views I return to the end-user. We retrieve the page based from an HTTP req header's user agent.

This is all done server-side to avoid users loading unnecessary data. But due to the lack of this user-agent using firefox, I always need to assume that it might be firefox and instead I have to do extra device detection at run time, which means my pages/data for firefox on iOS is loaded for all my other users (chrome, edge, safari, etc. etc..)

more options

Based on your original question, the two that look hard to distinguish are Firefox on iPad and Safari on iPad, since Firefox uses Safari's user agent string. Does something bad happen if you treat Firefox on iPad as Safari on iPad?