webcompat.com icon indicating copy to clipboard operation
webcompat.com copied to clipboard

Wrong user agent on Firefox iPadOS

Open magsout opened this issue 2 years ago • 2 comments

I reported a website on webcompat using my iPad, but webcompat detected Safari instead of Firefox Daylight 100.1 (9384)

C55ACA23-287A-4BAB-A434-940B44FF738D

My user agent is: 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

magsout avatar May 25 '22 22:05 magsout

Thanks @magsout. This is expected as Firefox on an iPad is returning Safari desktop UA by default, see https://github.com/mozilla-mobile/firefox-ios/blob/main/Shared/UserAgent.swift#L52.

I recall the team is using desktop Safari desktop UA at the moment because there were a number of reports with sites showing browser out-of-date warnings for Firefox iPad UA (https://github.com/mozilla-mobile/firefox-ios/issues/6310 for example). I think Safari on an iPad is also returning Safari desktop UA.

ksy36 avatar May 26 '22 14:05 ksy36

So maybe we could try and improve this on our side as there is device-tablet label that's coming from the iOS reporter on an iPad: https://github.com/webcompat/web-bugs/issues?q=is%3Aopen+is%3Aissue+label%3Adevice-tablet.

If the UA is Safari on desktop AND the label is present, we can change that text to something like "Did you encounter the issue on this device (iPad) using this browser (Firefox)"

ksy36 avatar May 26 '22 15:05 ksy36