Closed
Bug 1033886
Opened 11 years ago
Closed 10 years ago
RottenTomatoes.com doesn't server mobile content to Firefox OS
Categories
(Web Compatibility :: Site Reports, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: karlcow, Assigned: karlcow)
References
()
Details
(Whiteboard: [country-us][clientsniff][sitewait])
+++ This bug was initially created as a clone of Bug #950170 +++
With Firefox OS on a Flame device.
Go to http://www.rottentomatoes.com/
Expected:
Receive the mobile site like Firefox on Android.
aka http://www.rottentomatoes.com/mobile/
Actual:
Receiving the desktop site.
Comment 1•11 years ago
|
||
description |
This site intends to send mobile browsers to a mobile site, but there is a mistake in the code intended to handle the redirect. Hence the browser on Firefox OS phones get desktop content instead of mobile.
There is client-side browser detection in these files:
<script src="http://d1rjibvava1hwe.cloudfront.net/static/js/lib/device.min.js"></script>
<script src="http://d1rjibvava1hwe.cloudfront.net/static/js/mobile.upsell.redirect.js"></script>
Examples of the JavaScript logic:
/***** START of mobile upsell-redirect flow ******/
if(device.tablet()){
if(!getParameterByName("nopopup") && !hasSeenUpsell()){
setCookie(UPSELL_COOKIE, "true", UPSELL_COOKIE_EXPIRE_DAYS, "/");
showUpsell();
}
// Else continue to desktop page (no-op)
}
else if(device.mobile()){
if(!getParameterByName("nopopup") && !hasSeenUpsell()){
setCookie(UPSELL_COOKIE, "true", UPSELL_COOKIE_EXPIRE_DAYS, "/");
showUpsell();
}
if(!getParameterByName("fullsite")){
if(!hasFullSitePermCookie()){
redirectToMobileWeb();
}
else {
if(!hasRevertPromptCookie()){
promptRevertToMobileWeb();
}
}
}
}
In this code, hasSeenUpsell() tries to call getCookie() - this error is thrown:
ReferenceError: getCookie is not defined
No mobile browsers are currently redirected to the mobile site due to the missing function definition.
Whiteboard: [country-us] → [country-us][clientsniff][contactready]
Comment 2•11 years ago
|
||
suggestedfix |
The site needs to make sure getCookie() is defined before this code runs.
![]() |
Assignee | |
Updated•11 years ago
|
![]() |
Assignee | |
Comment 3•11 years ago
|
||
First Attempt at human contact
http://twitter.com/MozWebCompat/status/492493518967820289
http://www.linkedin.com/in/bestrada
Whiteboard: [country-us][clientsniff][contactready] → [country-us][clientsniff][sitewait]
![]() |
Assignee | |
Updated•11 years ago
|
Assignee: nobody → kdubost
Status: NEW → ASSIGNED
![]() |
Assignee | |
Comment 4•10 years ago
|
||
This has been fixed.
Yeah \o/
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Product: Tech Evangelism → Web Compatibility
Updated•1 years ago
|
Component: Mobile → Site Reports
You need to log in
before you can comment on or make changes to this bug.
Description
•