Closed Bug 979315 Opened 6 years ago Closed 4 years ago

rpp.com.pe sends desktop site

Categories

(Web Compatibility :: Mobile, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: cesar, Assigned: cesar, Mentored)

References

()

Details

(Whiteboard: [country-pe][clientsniff][sitewait])

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:27.0) Gecko/20100101 Firefox/27.0 (Beta/Release)
Build ID: 20140218135856

Steps to reproduce:

Enter to rpp.com.pe


Actual results:

stay in rpp.com.pe


Expected results:

redirect to m.rpp.com.pe
Whiteboard: [country-pe]
The rpp.com.pe site uses JavaScript to try to detect the device the site is loading on. The script fails to recognise Firefox OS devices as smartphones.

The script is part of an inline script, and the browser detection part looks like this:

 function chkdevice() { var uagent = navigator.userAgent.toLowerCase(); mobiledevices=new Array("maemo","symbian","blackberry","android","iphone","ipod","ipad","playstation"); for (key in mobiledevices){ if (uagent.search(mobiledevices[key])> -1){ if ((uagent.search('mobile')> -1)&&(uagent.search('ipad')==-1)) return 1; else return 2; } } return 0; } if (rppsitepage=='portada') { if (urlactual.indexOf('/?portada')==-1) { var device=chkdevice(); if (device==1) document.location='http://m.rpp.com.pe'; } } if (rppsitepage=='detalle') { if (referer.indexOf('rpp.com.pe')==-1) { var device=chkdevice(); if (device==1) { urlmovil=urlactual.replace(hostname,'m.rpp.com.pe'); document.location=urlmovil; } } }
Status: UNCONFIRMED → NEW
Ever confirmed: true
Whiteboard: [country-pe] → [country-pe][clientsniff][contactready][mentor=hsteen]
This bug is now fully analysed and anyone in the Mozilla community is welcome to reach out (politely! ;)) to rpp.com.pe. 

You can use this letter template or tweet:
https://wiki.mozilla.org/Compatibility/StdLetters#Spanish

and also include this URL:
http://webcompat.com/simplebug/#mozilla/979315
to give the site's webmaster a quick overview of the bug.

If you contact the site, please assign the bug to yourself and change "[contactready]" to "[sitewait]" in the box named "Whiteboard" (ask me if you can't change it).

Thank you!
Mentor: hsteen
Whiteboard: [country-pe][clientsniff][contactready][mentor=hsteen] → [country-pe][clientsniff][contactready]
Assignee: nobody → cesar
Whiteboard: [country-pe][clientsniff][contactready] → [country-pe][clientsniff][sitewait]
fixed
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Product: Tech Evangelism → Web Compatibility
You need to log in before you can comment on or make changes to this bug.