Closed Bug 1089163 Opened 11 years ago Closed 7 years ago

shoptime.com.br sends desktop site to Firefox OS

Categories

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

All
Gonk (Firefox OS)
defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: magsout, Unassigned, Mentored)

References

()

Details

(Whiteboard: [country-br] [clientsniff] [contactready] [js])

Site: http://www.shoptime.com.br/ http://www.shoptime.com.br/ is sending desktop content to Firefox OS :: Steps To Reproduce 1. Go to http://www.shoptime.com.br/ 2. 3. ... :: Expected Result Receive a mobile friendly content like it is happening for Safari iOS, redirection to http://m.shoptime.com.br/ :: Actual Result Received the Desktop Content.
Browser detection is here: http://ishop.s8.com.br/js/mobileRedir.js
Whiteboard: [country-br] → [country-br] [clientsniff] [contactready]
I guess we could push this bug to Webcompat.com. The detection is… interesting. var isMobile = /iP(hone|od)|Android.*Mobile/.test(userAgent); So anything Android passes, iPhone and iPod, but not Firefox OS. Making it compatible with iPhone would be easy with: var isMobile = /Mobile/.test(userAgent); This would solve a lot of issues, not all, but a lot :) Then the second test, we fail as Firefox Android. It is a very strange test. if( userAgent.indexOf("Android") >= 0 ) { var androidversion = parseFloat(userAgent.slice(userAgent.indexOf("Android")+8)); isAndroid23 = androidversion < 2.4; if (isAndroid23) { // NEVER TRIGGER A REDIRECT FOR UNSUPPORTED ANDROID DEVICES return false; } userAgent.indexOf("Android")+8 21 userAgent.slice(21) " Mobile; rv:30.0) Gecko/30.0 Firefox/30.0" parseFloat(userAgent.slice(userAgent.indexOf("Android")+8)) NaN We do not have a version number. So Firefox for Android fails here I guess. on Chrome Mobile, it's also a bit dangerous. I didn't know that parseFloat would take only the beginning of the string. Note that IE team will be happy to learn that they are denied the access too: if (/(windows phone)|(iemobile)/i.test(userAgent)) { // NEVER REDIRECT ON UNSUPPORTED DEVICES return false; } It's all a bit silly. When going to http://m.shoptime.com.br/ with Firefox Android or Firefox OS there is no issue. Most of the CSS properties have the equivalent vendor properties, except for Microsoft Though the site seems to have been made with a CSS preprocessor. So not sure I understand the reason behind this choice. Another reason to move this bug to webcompat.com
They have a twitter account which doesn't seem to interact with people https://twitter.com/canalshoptime B2W seems to own a lot of brands and be a big agency https://www.linkedin.com/company/10870?trk=prof-exp-company-name http://www.b2wdigital.com/ Some possible contacts Shoptime - ombudsman@shoptime.com http://www.b2wdigital.com/contatos
Mentor: kdubost
Whiteboard: [country-br] [clientsniff] [contactready] → [country-br] [clientsniff] [contactready] [js]
Priority: -- → P5
Closing as we are not working on Firefox OS anymore.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
Product: Tech Evangelism → Web Compatibility
Component: Mobile → Site Reports
You need to log in before you can comment on or make changes to this bug.