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)
Tracking
(firefox100 affected, firefox111 affected)
RESOLVED
FIXED
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
Reporter | ||
Updated•10 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
See Also: → 877761
Whiteboard: [mobile-compat-form] → [mobile-compat-form] [clientsniff] [country-cn] [contactready]
Comment 1•9 years ago
|
||
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
Updated•9 years ago
|
Summary: cmbchina.com sends desktop content to Firefox OS → cmbchina.com sends desktop content to Firefox Android
Comment 3•8 years ago
|
||
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)
Comment 4•7 years ago
|
||
(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)
Updated•7 years ago
|
Assignee: etsai → nobody
Priority: -- → P3
Comment 5•6 years ago
|
||
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)
Updated•6 years ago
|
Priority: P3 → P1
Comment 6•6 years ago
|
||
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)
Updated•6 years ago
|
Product: Tech Evangelism → Web Compatibility
Comment 7•5 years ago
|
||
See bug 1547409. Moving webcompat whiteboard tags to keywords.
Keywords: webcompat:contact-ready
Comment 8•3 years ago
|
||
The issue is still reproducible. Upon accessing the page, the desktop version of the page is received instead of the mobile version:
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)
Updated•3 years ago
|
Updated•2 years ago
|
Severity: normal → S3
Updated•2 years ago
|
status-firefox111:
--- → affected
Assignee | ||
Comment 9•2 years ago
|
||
The override was shipped in bug1805409 (https://github.com/mozilla-mobile/firefox-android/pull/1149/files#diff-a67cec84c97ec04fc92b45a659126eebd2240df94f1829ad767e417d749a9273), so we can probably close this.
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Updated•8 months ago
|
Component: Mobile → Site Reports
You need to log in
before you can comment on or make changes to this bug.
Description
•