Closed
Bug 964518
Opened 11 years ago
Closed 11 years ago
programme-tv.net doesn't show the mobile banner in Firefox OS
Categories
(Web Compatibility :: Site Reports, defect)
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: karlcow, Unassigned)
References
()
Details
(Whiteboard: [clientsniff] [country-fr] [sitewait])
Attachments
(1 file)
|
252.23 KB,
image/png
|
Details |
In this case, both iOS Safari and Firefox OS receives the desktop site. But iOS Safari gets an additional banner inviting to use http://m.programme-tv.net/
| Reporter | ||
Comment 1•11 years ago
|
||
| Reporter | ||
Comment 2•11 years ago
|
||
A lot of user agent sniffing going on.
→ http -v GET http://www.programme-tv.net/ "User-Agent: $FOSUA" | grep -i user
Agent
var ua = navigator.userAgent
if ( (navigator.userAgent.match(/iPhone/))
|| (navigator.userAgent.match(/iPod/))
|| (navigator.userAgent.match(/BlackBerry/))
|| (navigator.userAgent.match(/Samsung/)) || (navigator.userAgent.match(/-sec/i))
|| (navigator.userAgent.match(/Sagem/))
|| (navigator.userAgent.match(/HTC/))
|| (navigator.userAgent.match(/Nokia/))
|| (navigator.userAgent.match(/PocketPC/))
|| (navigator.userAgent.match(/Motorola/)) || (navigator.userAgent.match(/mot-/i))
|| (navigator.userAgent.match(/lg-/i))
|| (navigator.userAgent.match(/Siemens/)) || (navigator.userAgent.match(/sie-/i))
|| (navigator.userAgent.match(/Ericsson/))
|| (navigator.userAgent.match(/Palm/))
Whiteboard: [clientsniff] [country-fr] → [clientsniff] [country-fr] [contactready]
I don't know if the problem is corrected, but when I tried this afternoon, both on Firefox OS (see on the left on the image linked below) and on Firefox mobile in Android, it seemed I well got the mobile version of the site...
http://i.imgur.com/qdDoZFT.png
| Reporter | ||
Comment 4•11 years ago
|
||
Xavier indeed.
Ah my bad. Hallvord screenshots was based on user agent and here the redirection is happening base on the screen width.
if( mobileRedirectionUrl !== '' && detectDipWidth() < 500 )
{
window.location.href = mobileRedirectionUrl;
}
detectDipWidth() in Firefox OS falls back to "return window.screen.width;"
They have 3 paths: iOS, Android and the rest.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
Whiteboard: [clientsniff] [country-fr] [contactready] → [clientsniff] [country-fr] [sitewait]
| Assignee | ||
Updated•6 years ago
|
Product: Tech Evangelism → Web Compatibility
| Assignee | ||
Updated•1 year ago
|
Component: Mobile → Site Reports
You need to log in
before you can comment on or make changes to this bug.
Description
•