Closed Bug 826715 Opened 12 years ago Closed 10 years ago

noticias.uol.com.br doesn't recognize B2G UA as mobile

Categories

(Web Compatibility :: Site Reports, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: lmandel, Assigned: adamopenweb)

References

()

Details

(Whiteboard: [uaoverride] [country-br] [clientsniff] [serversniff][sitewait])

noticias.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.
Whiteboard: [uaoverride] → [uaoverride] [country-br]
Server side user agent detection with serving different content on the same domain name.
To be contacted so any mobile devices receive the same content.



# Firefox OS

GET / HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate, compress
Host: noticias.uol.com.br
User-Agent: Mozilla/5.0 (Mobile; rv:18.0) Gecko/18.0 Firefox/18.0

HTTP/1.1 200 OK
Cache-Control: max-age=30
Connection: close
Content-Encoding: gzip
Content-Length: 26929
Content-Type: text/html;charset=UTF-8
Date: Thu, 15 Aug 2013 19:41:45 GMT
ETag: "3873db33b33c36ed6865be8175f83ca8"
Expires: Thu, 15 Aug 2013 19:42:15 GMT
Last-Modified: Thu, 15 Aug 2013 19:41:17 GMT
Server: marrakesh 1.9.0
Vary: Accept-Encoding,User-Agent

# Firefox for Android

GET / HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate, compress
Host: noticias.uol.com.br
User-Agent: Mozilla/5.0 (Android; Mobile; rv:18.0) Gecko/18.0 Firefox/18.0

HTTP/1.1 200 OK
Cache-Control: max-age=30
Connection: close
Content-Encoding: gzip
Content-Length: 18579
Content-Type: text/html;charset=UTF-8
Date: Thu, 15 Aug 2013 19:41:55 GMT
ETag: "d608a8f36045bf659241332895a5198a"
Expires: Thu, 15 Aug 2013 19:42:25 GMT
Last-Modified: Thu, 15 Aug 2013 19:41:43 GMT
Server: marrakesh 1.9.0
Vary: Accept-Encoding,User-Agent
Assignee: nobody → kdubost
Whiteboard: [uaoverride] [country-br] → [uaoverride] [country-br] [serversniff]
Assignee: kdubost → nobody
Whiteboard: [uaoverride] [country-br] [serversniff] → [uaoverride] [country-br] [serversniff][contactready]
Really strange I get now a kind of big shape in the screen. But nothing usable.
I only got a big image of Santa Claus. *scary*

This site should be added on the UA override list. It's a news site and the content is important to the public accessibility.
Tested again today.  Still not working but a behavior slightly different.

Leonardo, the site is already on the UA override list. We want to remove the UA override when they recognize Firefox OS. 

It seems also the site has changed the server sniffing for client sniffing. For both iOS and Firefox OS, the content length is the same.
Content-Length: 14108 (today)

Digging into the JavaScript Code, I think that Firefox OS is receiving the mobile site on the UA identification but there are additional incompatible scripts down the cascade.

I guess we could remove the UA override somewhow as it is now more a question of what kind of code gets executed. They are using WURFL too.

<script>
if (navigator.userAgent.toString().match("Opera/\d{0,1}.\d{0,3}(.*)(; Opera)(.*)(Presto/)")==null) {
	var marrakeshCookie=new RegExp(".*?x-user-agent-class=(.*?)(;.*?$|$)","g");
	if (unescape(document.cookie.replace(marrakeshCookie,"$1"))==="SMART") {
		if (navigator.userAgent.toString().match("iPad")!=null) {
			document.cookie="x-user-agent-class=; expires=; path=/;domain=.uol.com.br";
			window.location.reload();
		}
	}
} else {
	document.cookie="x-user-agent-class=FEATURE; expires=; path=/;domain=.uol.com.br";
	window.location.reload();}
</script>


And also

 <script type="text/javascript">
(function(){
	var checkWurfl={},theUA;
	checkWurfl={
		blackList:["iPad","Xoom","MZ604","GT-P5100","GT-P1000"],
		init:function(){
			theUA=navigator.userAgent.toString();
			blackListSize=checkWurfl.blackList.length;
			while(blackListSize--){
				if(theUA.match(checkWurfl.blackList[blackListSize])){
					document.cookie="x-user-agent-class=; expires=Thu, 01 Jan 1970 00:00:01 GMT;domain=.uol.com.br;";
					window.location.reload();
				}
			}
		}
	};
	checkWurfl.init();
}());
</script>
Whiteboard: [uaoverride] [country-br] [serversniff][contactready] → [uaoverride] [country-br] [clientsniff][contactready]
Whiteboard: [uaoverride] [country-br] [clientsniff][contactready] → [uaoverride] [country-br] [clientsniff] [serversniff][contactready]
Trying contact on Twitter.
Assignee: nobody → astevenson
Status: NEW → ASSIGNED
Whiteboard: [uaoverride] [country-br] [clientsniff] [serversniff][contactready] → [uaoverride] [country-br] [clientsniff] [serversniff][sitewait]
This is fixed. Bravo Adam.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Blocks: 978663
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.