DamonOehlman / detect-browser

Unpack a browser type and version from the useragent string

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to detect Firefox browser in iOS

ldttmt opened this issue Β· comments

Hi, thanks for a great package πŸ…
It seems Firefox browser in iOS now returns "Safari" as browser name instead of "FxiOS" as before. Is there any other way to detect it in iOS?
Here is the UA from Firefox in my iPad:

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

has this been addressed yet?

@NeoHoffa I haven't done anything here as yet, because honestly, I'm not sure what options we have. In many ways it makes sense that this is returned as Safari, because that's pretty much what it is on iOS as far as I understand things. Just wrapped up slightly differently, but from a rendering engine perspective it's almost exactly the same πŸ€·β€β™‚οΈ

There are subtle differences between Firefox iOS and Safari. In particular, you can't click on a blob url to trigger a file download in any browser except Safari because WebViews are broken. Would be nice if we could figure out a way to detect Firefox to workaround this.

Interestingly mozilla-mobile/firefox-ios#6620 has been triaged as a bug and included on a project in that repo. Perhaps they are looking to get the FxiOS string back as part of the UA?