Closed
Bug 826330
Opened 12 years ago
Closed 10 years ago
uol.com.br doesn't recognize B2G UA as mobile
Categories
(Web Compatibility :: Site Reports, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: lmandel, Assigned: karlcow, NeedInfo)
References
()
Details
(Whiteboard: [country-br] [sitewait] [serversniff])
Attachments
(2 files)
uol.com.br serves a desktop site to B2G. Bug 819210 added an UA override for this domain. The override should be removed once the domain serves mobile content to B2G. This bug tracks the evangelism for the site to recognize the B2G UA and the removal of the override at that time.
Reporter | ||
Updated•12 years ago
|
Blocks: uol.com.br
Component: Gaia → Mobile
Product: Boot2Gecko → Tech Evangelism
Whiteboard: [uaoverride]
Comment 1•12 years ago
|
||
Comment 2•12 years ago
|
||
Comment 3•12 years ago
|
||
I was testing uol.com.br website at Firefox OS Simulator and it have a button (https://bug826330.bugzilla.mozilla.org/attachment.cgi?id=699355) to change to the mobile version (https://bugzilla.mozilla.org/attachment.cgi?id=699357) of the website.
Is this necessary to contact someone at uol.com.br or this button works for solve this bug?
I'm asking this because I work at UOL, not at the same area that works with this page specifies, but I can search who is the person that can helps us to fix this problem!
Reporter | ||
Comment 4•12 years ago
|
||
Thank you very much for the offer to help! We would like to have uol.com.br serve the mobile site by default to Firefox for Android and Firefox OS. Your User Agent (UA) detection code needs to be updated to recognize the Firefox for Android and Firefox OS UAs as those for mobile browsers. The UAs are:
Firefox for Android
Mozilla/5.0 (Android; Mobile; rv:18.0) Gecko/18.0 Firefox/18.0
Firefox OS
Mozilla/5.0 (Mobile; rv:18.0) Gecko/18.0 Firefox/18.0
Our recommendation is to have your UA detection code recognize the "mobi" token and take its presence to signal that the browser is a mobile browser. Recognizing this token should allow your site to correctly identify a wide variety of mobile browsers.
I have bugs on file for a number of other related domains. Can you help with these as well?
noticias.uol.com.br (bug 826715)
clickjogos.uol.com.br (bug 826949)
pagseguro.uol.com.br (bug 827625)
bol.uol.com.br (bug 827627)
Reporter | ||
Updated•12 years ago
|
OS: Gonk (Firefox OS) → All
Summary: uol.com.br doesn't recognize B2G UA as mobile → uol.com.br doesn't recognize Fennec and B2G UAs as mobile
I've tested UOL.com.br on a FXOS Geeksphone dev preview and it's working fine.
It's opening the m. version.
Comment 6•12 years ago
|
||
(In reply to mkt45 from comment #5)
> I've tested UOL.com.br on a FXOS Geeksphone dev preview and it's working
> fine.
> It's opening the m. version.
Confirmed. I'll file a bug to pull out the override.
Thanks for letting everyone know this is now fixed!
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 7•12 years ago
|
||
I get desktop content after removing the UA override on my Unagi.
Jason - How did you test this fix?
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 8•12 years ago
|
||
(In reply to Lawrence Mandel [:lmandel] from comment #7)
> I get desktop content after removing the UA override on my Unagi.
>
> Jason - How did you test this fix?
I tested this through Phony by switching the UA to Firefox OS UA. Is that not working then?
Reporter | ||
Comment 9•12 years ago
|
||
(In reply to Jason Smith [:jsmith] from comment #8)
> (In reply to Lawrence Mandel [:lmandel] from comment #7)
> > I get desktop content after removing the UA override on my Unagi.
> >
> > Jason - How did you test this fix?
>
> I tested this through Phony by switching the UA to Firefox OS UA. Is that
> not working then?
Phony does not modify navigator.userAgent. If that's in use in this site, it would explain the inconsistency between the Fennec and B2G based testing.
Reporter | ||
Comment 10•12 years ago
|
||
Fennec is now served as mobile site, as tracked by bug 759108.
OS: All → Gonk (Firefox OS)
Summary: uol.com.br doesn't recognize Fennec and B2G UAs as mobile → uol.com.br doesn't recognize B2G UA as mobile
Comment 11•12 years ago
|
||
(In reply to Lawrence Mandel [:lmandel] from comment #9)
> (In reply to Jason Smith [:jsmith] from comment #8)
> > (In reply to Lawrence Mandel [:lmandel] from comment #7)
> > > I get desktop content after removing the UA override on my Unagi.
> > >
> > > Jason - How did you test this fix?
> >
> > I tested this through Phony by switching the UA to Firefox OS UA. Is that
> > not working then?
>
> Phony does not modify navigator.userAgent. If that's in use in this site, it
> would explain the inconsistency between the Fennec and B2G based testing.
I don't follow. Then what's happening when you visit a site with Firefox OS set as the UA in phony?
Flags: needinfo?(mbrubeck)
Reporter | ||
Comment 12•12 years ago
|
||
(In reply to Jason Smith [:jsmith] from comment #11)
> I don't follow. Then what's happening when you visit a site with Firefox OS
> set as the UA in phony?
My understanding is that the UA that is sent as part of the request header is modified. The UA as reported via navigator.userAgent (i.e. used in JS) is not modified.
Comment 13•12 years ago
|
||
(In reply to Lawrence Mandel [:lmandel] from comment #12)
> My understanding is that the UA that is sent as part of the request header
> is modified. The UA as reported via navigator.userAgent (i.e. used in JS) is
> not modified.
Yes, I believe that's correct. Phony just sets the "general.useragent.override" pref, which as far as I know does not change the value of navigator.userAgent. This is a bug/limitation in Phony.
Flags: needinfo?(mbrubeck)
![]() |
Assignee | |
Comment 14•12 years ago
|
||
Hi Clauber,
Have you made any progress. If possible you could share my contact information with the relevant person at UOL. See below more details about your server configurations.
(In reply to Clauber Stipkovic from comment #3)
> I'm asking this because I work at UOL, not at the same area that works with
> this page specifies, but I can search who is the person that can helps us to
> fix this problem!
I have tested with a ZTE device. Firefox OS gets the desktop version of the Web site.
As you can see the browser is redirected to the mobile version for an iphone.
→ curl -sI -A "Mozilla/5.0 (iPhone; CPU iPhone OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334" http://www.uol.com.br/
HTTP/1.1 302 Found
Date: Wed, 03 Jul 2013 16:11:24 GMT
Server: Apache/2.0.63 (Unix) Ganesh/2.2.0
Location: http://m.uol.com.br/?web
Connection: close
Content-Type: text/html; charset=iso-8859-1
After testing, the minimum string creating the redirect is "iPhone" (case-sensitive iphone doesn't trigger the redirect)
→ curl -sI -A "iPhone" http://www.uol.com.br/
HTTP/1.1 302 Found
Date: Wed, 03 Jul 2013 16:12:14 GMT
Server: Apache/2.0.63 (Unix) Ganesh/2.2.0
Location: http://m.uol.com.br/?web
Connection: close
Content-Type: text/html; charset=iso-8859-1
The strings "Mobile", "mobi", "Mobi" do not trigger any redirect too.
→ curl -sI -A "Mobile" http://www.uol.com.br/
HTTP/1.1 200 OK
Date: Wed, 03 Jul 2013 16:13:53 GMT
Server: Apache
Content-Type: text/html; charset=utf-8
Cache-Control: no-cache, no-store
Pragma: no-cache, no-store
Content-Length: 331303
Set-cookie: UOL_VIS=A|66.130.24.10|1372868033.692726|; domain=.uol.com.br; path=/; expires=Thu, 04-Jul-2013 06:00:00 GMT
Vary: Accept-Encoding,User-Agent
Expires: Mon, 06 Jan 1990 00:00:01 GMT
Connection: close
Which means it fails for Opera as well as Firefox.
→ curl -sI -A "Opera/9.80 (Android 5.0; Opera Mobi/456) Presto/2.11 Version/12.00" http://www.uol.com.br/
HTTP/1.1 200 OK
Date: Wed, 03 Jul 2013 16:17:07 GMT
Server: Apache
Content-Type: text/html
Cache-Control: no-store
Pragma: no-cache
Content-Length: 331231
Set-cookie: UOL_VIS=A|66.130.24.10|1372868227.972409|; domain=.uol.com.br; path=/; expires=Thu, 04-Jul-2013 06:00:00 GMT
Vary: Accept-Encoding,User-Agent
Connection: close
The stats in Brazil shows Opera around 15.77% and iPhone at 14.75%, which is equivalent, so "Mobi*" seems to be a good keyword to add to the current user agent sniffing going on.
http://gs.statcounter.com/#mobile_browser-BR-monthly-201206-201306
The web site is also currently triggering redirects on "Android 2" and "Android 4"
→ curl -sI -A "Android 1" http://www.uol.com.br/
HTTP/1.1 200 OK
Date: Wed, 03 Jul 2013 16:36:36 GMT
Server: Apache
Content-Type: text/html
Cache-Control: no-store
Pragma: no-cache
Content-Length: 330835
Set-cookie: UOL_VIS=A|66.130.24.10|1372869396.27140|; domain=.uol.com.br; path=/; expires=Thu, 04-Jul-2013 06:00:00 GMT
Vary: Accept-Encoding,User-Agent
Connection: close
![]() |
Assignee | |
Updated•12 years ago
|
Whiteboard: [uaoverride] → [uaoverride][uasniffserverside]
![]() |
Assignee | |
Updated•12 years ago
|
Whiteboard: [uaoverride][uasniffserverside] → [uaoverride] [country-br] [sitewait] [serversniff]
![]() |
Assignee | |
Comment 15•12 years ago
|
||
Clauber in the case you had not seen the previous comment?
Flags: needinfo?(clauber.halic)
Comment 16•11 years ago
|
||
I just talked to someone who created the UA-sniffing tool at UOL, but he's no longer member of that team, but he is engaging someone to take care of this thread.
Soon we will have a contact to solve this.
![]() |
Assignee | |
Comment 17•11 years ago
|
||
I'm in contact with someone from Globo too. :)
Comment 18•11 years ago
|
||
A config update was delivered today. The UA string must contain both "Mobile" and "Firefox" since searching only for "Mobile" would make some tables to be redirected to the mobile version.
Thanks for reporting
![]() |
Assignee | |
Comment 19•11 years ago
|
||
(In reply to dnykn from comment #18)
> A config update was delivered today.
dnykn, Thanks a lot. Tested and working.
Not fixed yet for
* Bug 826715 noticias.uol.com.br
* Bug 827625 pagseguro.uol.com.br
* Bug 827627 bol.uol.com.br
dnykn if could help us reach the right people there, that would be cool. Thanks.
Status: REOPENED → RESOLVED
Closed: 12 years ago → 11 years ago
Resolution: --- → FIXED
Comment 20•11 years ago
|
||
automated testing confirms fix too :-)
Comment 23•11 years ago
|
||
:karlcow(In reply to Karl Dubost :karlcow from comment #22)
> Thanks for the efforts Clauber.
Sorry for the delay to help more and thank very much for solve the bug :)
Comment 24•11 years ago
|
||
Unfortunately it seems this fix is overly sensitive to the version number in the UA string. Here, requesting uol.com.br with "Mozilla/5.0 (Mobile; rv:26.0) Gecko/26.0 Firefox/26.0" UA redirects to the mobile site, while requesting uol.com.br with "Mozilla/5.0 (Mobile; rv:29.0) Gecko/29.0 Firefox/29.0" UA does *not* redirect.
As several shipping or upcoming Firefox OS releases will have version numbers greater than 26, it would be great to get this fixed. Clauber, Daniel: Should I report a new bug?
Flags: needinfo?(danielkono)
Flags: needinfo?(clauber.halic)
![]() |
Assignee | |
Comment 25•11 years ago
|
||
Hmm I just tried with Firefox OS / 32. And I get the mobile site.
![]() |
Assignee | |
Comment 26•11 years ago
|
||
Hmm weird. Check that.
I suspect a load-balancer with configurations not deployed on all servers. We are not hitting the same servers.
Server: Apache/2.0.63 (Unix) Ganesh/2.2.0
Server: marrakesh 1.9.4
***10:27:43***
→ http --print hH http://www.uol.com.br/ User-Agent:"Mozilla/5.0 (Mobile; rv:32.0) Gecko/32.0 Firefox/32.0"
GET / HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate, compress
Host: www.uol.com.br
User-Agent: Mozilla/5.0 (Mobile; rv:32.0) Gecko/32.0 Firefox/32.0
HTTP/1.1 302 Found
Connection: close
Content-Length: 208
Content-Type: text/html; charset=iso-8859-1
Date: Fri, 04 Jul 2014 01:28:02 GMT
Location: http://m.uol.com.br/?web
Server: Apache/2.0.63 (Unix) Ganesh/2.2.0
***10:28:02***
→ http --print hH http://www.uol.com.br/ User-Agent:"Mozilla/5.0 (Mobile; rv:32.0) Gecko/32.0 Firefox/32.0"
GET / HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate, compress
Host: www.uol.com.br
User-Agent: Mozilla/5.0 (Mobile; rv:32.0) Gecko/32.0 Firefox/32.0
HTTP/1.1 200 OK
Cache-Control: no-store
Connection: close
Content-Encoding: gzip
Content-Type: text/html
Date: Fri, 04 Jul 2014 01:28:14 GMT
Pragma: no-cache
Server: marrakesh 1.9.4
Transfer-Encoding: chunked
Vary: Accept-Encoding,User-Agent
Comment 27•11 years ago
|
||
Re-tested. I'm still seeing desktop content here :-/
![]() |
Assignee | |
Comment 28•11 years ago
|
||
21:32:05 → get www.uol.com.br | grep -i location
21:32:10 → get www.uol.com.br | grep -i location
21:32:14 → get www.uol.com.br | grep -i location
21:32:17 → get www.uol.com.br | grep -i location
Location: http://m.uol.com.br/?web
21:32:19 → get www.uol.com.br | grep -i location
21:32:21 → get www.uol.com.br | grep -i location
21:32:23 → get www.uol.com.br | grep -i location
21:32:25 → get www.uol.com.br | grep -i location
21:32:27 → get www.uol.com.br | grep -i location
21:32:29 → get www.uol.com.br | grep -i location
21:32:30 → get www.uol.com.br | grep -i location
21:32:32 → get www.uol.com.br | grep -i location
21:32:34 → get www.uol.com.br | grep -i location
Location: http://m.uol.com.br/?web
21:32:36 → get www.uol.com.br | grep -i location
21:32:38 → get www.uol.com.br | grep -i location
21:32:41 → get www.uol.com.br | grep -i location
Location: http://m.uol.com.br/?web
21:32:43 → get www.uol.com.br | grep -i location
21:32:45 → get www.uol.com.br | grep -i location
Location: http://m.uol.com.br/?web
21:32:48 → get www.uol.com.br | grep -i location
Location: http://m.uol.com.br/?web
21:32:50 → get www.uol.com.br | grep -i location
Location: http://m.uol.com.br/?web
Comment 29•11 years ago
|
||
It needs some action from their side, it seems..
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
Whiteboard: [uaoverride] [country-br] [sitewait] [serversniff] → [country-br] [contactready] [serversniff]
Updated•11 years ago
|
Status: REOPENED → NEW
![]() |
Assignee | |
Updated•11 years ago
|
URL: http://uol.com.br/
![]() |
Assignee | |
Comment 30•11 years ago
|
||
So to see if there was a regular pattern, I created a small bash script.
for ((i=1;i<=100;i++));
do
blah=`http --print hH GET http://www.uol.com.br/ "User-Agent: Mozilla/5.0 (Mobile; rv:30.0) Gecko/30.0 Firefox/30.0" | grep -i location`;
echo "$i $blah";
sleep 3;
done
The result displays as
=======================================
1 Location: http://m.uol.com.br/?web
2
3
4
5
6
7 Location: http://m.uol.com.br/?web
8 Location: http://m.uol.com.br/?web
9
… etc.
=======================================
So on the 100 HTTP requests, 36 went to the mobile site, the rest to the desktop site.
Assignee: nobody → kdubost
Whiteboard: [country-br] [contactready] [serversniff] → [country-br] [sitewait] [serversniff]
Comment 31•10 years ago
|
||
still a problem
Comment 32•10 years ago
|
||
I only got mobile content now and hope the fix propagated properly..
Status: NEW → RESOLVED
Closed: 11 years ago → 10 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Product: Tech Evangelism → Web Compatibility
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
•