Closed Bug 1081239 Opened 10 years ago Closed 2 years ago

cmbchina.com sends desktop content to Firefox Android

Categories

(Web Compatibility :: Site Reports, defect, P1)

ARM
Android

Tracking

(firefox100 affected, firefox111 affected)

RESOLVED FIXED
Tracking Status
firefox100 --- affected
firefox111 --- affected

People

(Reporter: hsteen, Assigned: ksenia)

References

()

Details

(Keywords: webcompat:contact-ready, Whiteboard: [mobile-compat-form] [clientsniff] [country-cn] [contactready])

Site: https://www.cmbchina.com cmbchina.com sends desktop content to Firefox OS :: Steps To Reproduce This site intends to send mobile browsers to a mobile site, but doesn't know that Firefox OS devices are smartphones. Hence the browser on Firefox OS phones get desktop content instead of mobile. The browser detection is handled with this JavaScript inside the main page: <script type="text/javascript"> if(/AppleWebKit.*Mobile/i.test(navigator.userAgent) || (/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amoi|ZTE/.test(navigator.userAgent))){ if(window.location.href.indexOf("?from=mweb")<0){ try{ if(/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)){ window.location.href="http://m.cmbchina.com/"; }else if(/iPad/i.test(navigator.userAgent)){ }else{ window.location.href="http://m.cmbchina.com/" } }catch(e){} } } :: Expected Result Mobile content :: Actual Result Desktop site :: Additional Information Software Version: 2.0 Reporter's User Agent: Mozilla/5.0 (Mobile; rv:18.1) Gecko/18.1 Firefox/18.1
Status: UNCONFIRMED → NEW
Ever confirmed: true
See Also: → 877761
Whiteboard: [mobile-compat-form] → [mobile-compat-form] [clientsniff] [country-cn] [contactready]
In accordance to https://groups.google.com/d/msg/mozilla.compatibility/OHsR590ExWs/W3ohc41tFAAJ Requalifying the bug, the issue is happening on Firefox Android too.
OS: Gonk (Firefox OS) → Android
Hardware: Other → ARM
Summary: cmbchina.com sends desktop content to Firefox OS → cmbchina.com sends desktop content to Firefox Android
Eric, would you be able to help with outreach here?
Flags: needinfo?(etsai)
I will take this. BingQing, I will try to find contact window, see if this is already in your contact list.
Assignee: nobody → etsai
Flags: needinfo?(etsai) → needinfo?(bli)
(In reply to Eric Tsai from comment #3) > I will take this. BingQing, I will try to find contact window, see if this > is already in your contact list. We're trying to find someone who can help us at CMB, but please expect some delay.
Flags: needinfo?(bli)
Assignee: etsai → nobody
Priority: -- → P3
The issue is still reproducible. Firefox does not redirect to http://m.cmbchina.com/Default.aspx as Chrome does. Karl, can you please take a look at this one?
Flags: needinfo?(kdubost)
Priority: P3 → P1
With a chrome Mobile UA, accessing https://www.cmbchina.com/ redirects the browser to http://m.cmbchina.com/Default.aspx With a Firefox Mobile UA, accessing https://www.cmbchina.com/ leaves it as-is The diagnostic from the initial comment still stands. It is in the home page and has not changed. https://bugzilla.mozilla.org/show_bug.cgi?id=1081239#c0 ``` <script type="text/javascript"> if (/AppleWebKit.*Mobile/i.test(navigator.userAgent) || (/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amoi|ZTE/.test(navigator.userAgent))) { if (window.location.href.indexOf("?from=mweb") < 0) { try { if (/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) { window.location.href = "http://m.cmbchina.com/"; } else if (/iPad/i.test(navigator.userAgent)) {} else { window.location.href = "http://m.cmbchina.com/" } } catch (e) {} } } </script> ``` They could fix the script by changing this line if (/AppleWebKit.*Mobile/i.test(navigator.userAgent) || to if (/Mobile/i.test(navigator.userAgent) || That would take care of more mobile including Firefox Android "Mozilla/5.0 (Android 7.0.0; Mobile; rv:62.0) Gecko/62.0 Firefox/62.0"
Flags: needinfo?(kdubost)
Product: Tech Evangelism → Web Compatibility

See bug 1547409. Moving webcompat whiteboard tags to keywords.

The issue is still reproducible. Upon accessing the page, the desktop version of the page is received instead of the mobile version:

https://prnt.sc/mUj4FKLDs3Gm

Tested with:

Browser / Version: Firefox Nightly 100.0a1 (2015869419 -🦎100.0a1-20220317092857🦎)
Operating System: Google Pixel 3 (Android 12) -1080 x 2160 pixels, 18:9 ratio (~443 ppi density)

Assignee: nobody → kberezina
Status: NEW → ASSIGNED
Severity: normal → S3
Depends on: 1819450
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Component: Mobile → Site Reports
You need to log in before you can comment on or make changes to this bug.