Closed
Bug 979704
Opened 10 years ago
Closed 6 years ago
www.roomie.jp sends the desktop version to Firefox OS
Categories
(Web Compatibility :: Site Reports, defect, P5)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: karlcow, Assigned: karlcow)
References
()
Details
(Whiteboard: [mobile-compat-form] [country-jp] [clientsniff] [sitewait])
Site: http://www.roomie.jp/ www.roomie.jp sends the desktop version to Firefox OS :: Steps To Reproduce 1. Open Firefox OS (on ZTE) 2. Go to http://www.roomie.jp/ :: Expected Result be redirected to http://www.roomie.jp/sp/ like Firefox for Android and other mobile browsers :: Actual Result stays on http://www.roomie.jp/ which is desktop only :: Additional Information Software Version: 1.2 Device Information: roamer2 Reporter's User Agent: Mozilla/5.0 (Mobile; rv:26.0) Gecko/26.0 Firefox/26.0
Assignee | ||
Comment 1•10 years ago
|
||
The current site is doing user agent detection on the client side. // iPhone/iPad/iPod、Androidの場合は振り分けを判断 var ua = navigator.userAgent; if ( ua.indexOf('iPhone') > 0 && ua.indexOf("FBID/tablet") == -1 || ua.indexOf('iPod') > 0 && ua.indexOf("FBID/tablet") == -1 || ( ua.indexOf('Tablet') == -1 && ua.indexOf('Android') > 0 && ua.indexOf('Mobile') > 0 ) || ua.indexOf('blackberry') > 0 || ua.indexOf('IEMobile') > 0 ) { if( location.pathname.indexOf( '/sp' ) != -1 ){ location.href = location.protocol + "//" + location.hostname + location.pathname; //console.log(location.protocol + "//" + location.hostname + location.pathname); }else{ location.href = location.protocol + "//" + location.hostname + "/sp" + location.pathname; } }
Status: UNCONFIRMED → NEW
Ever confirmed: true
Whiteboard: [mobile-compat-form] → [mobile-compat-form] [country-jp] [clientsniff]
Assignee | ||
Comment 2•10 years ago
|
||
suggestedfix |
Just to clarify the logic above: IF the ua string contains "iPhone" AND NOT "FBIB/tablet" OR "iPod" AND NOT "FBIB/tablet" OR "Android" AND "Mobile" AND NOT "Tablet" OR "blackberry" OR "IEMobile" THEN IF the location already contains mobile path '/sp' then rewrite the location to itself. else insert '/sp' to the location to enable mobile This could be improved and simplified. // user agent in lowercase var agent = navigator.userAgent.toLowerCase(); // detecting if there is the string tablet var tablet = (agent.indexOf("tablet") != -1); // detecting if it's a mobile but not a tablet var isMobile = (agent.indexOf("mobi") != -1) || (!tablet) ? true : false; // detecting if domain is not on Mobile var isDesktopDomain = (location.pathname.indexOf('/sp') === 0) ? false : true; if (isMobile && isDesktopDomain) { location.href = location.protocol + "//" + location.hostname + "/sp" + location.pathname; } It will catch more mobile devices
Assignee: nobody → kdubost
Status: NEW → ASSIGNED
Hardware: Other → ARM
Assignee | ||
Comment 3•10 years ago
|
||
In the initial detection, there is "blackberry" which is likely not detecting anything. BlackBerry strings are of two types: * BlackBerry9700/5.0.0.344 Profile/MIDP-2.1 Configuration/CLDC-1.1 VendorID/229 * Mozilla/5.0 (BlackBerry; U; BlackBerry 9800; en) AppleWebKit/534.1+ (KHTML, Like Gecko) Version/6.0.0.141 Mobile Safari/534.1+ Playbook were * Mozilla/5.0 (PlayBook; U; RIM Tablet OS 1.0.0; en-US) AppleWebKit/534.8+ (KHTML, like Gecko) Version/0.0.1 Safari/534.8+
Assignee | ||
Comment 4•10 years ago
|
||
Note this Web site is handled by http://www.mediagene.co.jp/about which has also lifehacker JP, kotaku, cafeglobe, tabroid, etc.
Assignee | ||
Comment 5•10 years ago
|
||
contact email |
Contacted roomie through their email.
Assignee | ||
Comment 6•9 years ago
|
||
contact twitter |
Trying to contact them through twitter with a human person. http://twitter.com/MozWebCompat/status/588224522169495552
Assignee | ||
Updated•9 years ago
|
Whiteboard: [mobile-compat-form] [country-jp] [clientsniff] → [mobile-compat-form] [country-jp] [clientsniff] [sitewait]
Assignee | ||
Updated•8 years ago
|
Priority: -- → P5
Assignee | ||
Comment 7•6 years ago
|
||
Closing as we are not working on Firefox OS anymore.
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
Updated•5 years ago
|
Product: Tech Evangelism → Web Compatibility
Updated•2 months ago
|
Component: Mobile → Site Reports
You need to log in
before you can comment on or make changes to this bug.
Description
•