Closed Bug 826348 Opened 12 years ago Closed 6 years ago

linkedin.com doesn't recognize Firefox OS UA as mobile

Categories

(Web Compatibility :: Site Reports, defect, P5)

ARM
Gonk (Firefox OS)
defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: lmandel, Assigned: karlcow)

References

()

Details

(Whiteboard: [uaoverride] [country-all] [contactready] [serversniff] [lib-yui] )

linkedin.com 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.
OS: Gonk (Firefox OS) → All
Summary: linkedin.com doesn't recognize B2G UA as mobile → linkedin.com doesn't recognize Fennec and B2G UAs as mobile
As per bug 755642, LinkedIn now serves mobile content to Fennec. We still need to outreach to get them to serve mobile content to B2G and drop the Android ad for B2G.
OS: All → Gonk (Firefox OS)
Summary: linkedin.com doesn't recognize Fennec and B2G UAs as mobile → linkedin.com doesn't recognize B2G UA as mobile
Isolated the piece of code doing UA detection 
https://gist.github.com/karlcow/5975683

The Firefox OS user agent string will be identified as Gecko only
User-Agent:'Mozilla/5.0 (Mobile; rv:18.0) Gecko/18.0 Firefox/18.0'

The logic of the algorithm is strange also for other browsers.
Tried a first contact at LinkedIn.
Flags: needinfo?(vphan)
Karl, this is YUI - should be fixed at source?
http://developer.yahoo.com/yui/docs/YAHOO.env.ua.html says 

"mobile - static string
The mobile property will be set to a string containing any relevant user agent information when a modern mobile browser is detected. Currently limited to Safari on the iPhone/iPod Touch, Nokia N-series devices with the WebKit-based browser, and Opera Mini."

Got contacts @ Yahoo?
See Also: → 895501
Hallvord. Ah good. I have opened a specific bug for YUI (Bug 895501). As the UA override for linkedin will have to be removed once the YUI is fixed.

Thanks.
Is YUI hosted in this case or will we need to 1. get YUI fixed and 2. get LinkedIn to update their copy of YUI?
Not sure about what exact URL Karl's Gist came from, but all external JS files I see in a quick look are served from http://s.c.lnkd.licdn.com - so I guess LinkedIn needs to do some work too.
Yes linkedin will have to be fixed, probably by moving to YUI3.
Contacted on 2013-07-11 and 2013-07-23
Whiteboard: [uaoverride] → [uaoverride] [sitewait]
Assignee: nobody → kdubost
Whiteboard: [uaoverride] [sitewait] → [uaoverride] [country-all] [sitewait] [clientsniff] [lib-yui]
Trying another contact.
> I've already added a bug into our queue for this. It's a server change so it will get prioritized in the Mobile server team. 

ok good news from Linkedin.
Status: NEW → ASSIGNED
sent a reminder.
https://github.com/linkedin?tab=members has a lot of names. The trick is to find someone who can help us.
Sent a reminder to my contact, and if not working will try to contact someone else.
In the process of trying to understand why this was not fixed,  I realized that it might be more complicated than just upgrading to YUI3 Lib. I have seen UA sniffing here and there in the code.
I was about to switch to notcontactready so hallvors or mike can give it a spin BUT

there is now a server side user agent detection. On Firefox for Android, you get the mobile content for login/signin form, while on Firefox OS you get the desktop signing form.

I'm changing the label. 

# Firefox for Android -> Mobile
GET / HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate, compress
Host: www.linkedin.com
User-Agent: Mozilla/5.0 (Android; Mobile; rv:18.0) Gecko/18.0 Firefox/18.0

HTTP/1.1 302 Moved Temporarily
Cache-Control: no-cache, no-store
Connection: keep-alive
Content-Length: 104
Content-Type: text/plain; charset=UTF-8
Date: Thu, 27 Feb 2014 05:29:16 GMT
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Location: https://touch.www.linkedin.com?sessionid=2299615223218176&or=true#home
Pragma: no-cache
Server: nginx
Set-Cookie: moflow_session_id=2688850969231360; Path=/; Domain=.www.linkedin.com; Max-Age=900; Expires=Thu, 27 Feb 2014 05:44:16 GMT
Set-Cookie: moflow_session_id=2407868993110016; Path=/; Domain=.www.linkedin.com; Max-Age=900; Expires=Thu, 27 Feb 2014 05:44:16 GMT
Set-Cookie: moflow_session_id=2299615223218176; Path=/; Domain=.www.linkedin.com; Max-Age=900; Expires=Thu, 27 Feb 2014 05:44:16 GMT
Set-Cookie: moflow_session_id=8667254631694336; Path=/; Domain=.www.linkedin.com; Max-Age=900; Expires=Thu, 27 Feb 2014 05:44:16 GMT
Set-Cookie: moflow_session_id=2012994145878016; Path=/; Domain=.www.linkedin.com; Max-Age=900; Expires=Thu, 27 Feb 2014 05:44:16 GMT
Set-Cookie: moflow_session_id=8642574382268416; Path=/; Domain=.www.linkedin.com; Max-Age=900; Expires=Thu, 27 Feb 2014 05:44:16 GMT
Set-Cookie: bcookie="v=2&12661069-1ed2-425e-8c1a-0839b00a04aa"; domain=.linkedin.com; Path=/; Expires=Sat, 27-Feb-2016 17:06:48 GMT
Set-Cookie: bscookie="v=1&2014022705291682a6bf7c-2749-453d-85e4-f98cfb5c93cfAQF19-cAjhBOEjQlbxEwGRpZzSKvnPCI"; domain=.www.linkedin.com; Path=/; Secure; Expires=Sat, 27-Feb-2016 17:06:48 GMT; HttpOnly
Set-Cookie: lidc="b=LB86:g=54:u=1:i=1393478956:t=1393565356:s=4277327983"; Expires=Fri, 28 Feb 2014 05:29:16 GMT; domain=.linkedin.com; Path=/
Set-Cookie: X-LI-IDC=C1
Vary: Accept
X-LI-UUID: qTZjhj_-lkdEhuP5f486
X-Li-Fabric: PROD-ELA4
X-Li-Pop: PROD-ELA4



# Firefox OS -> Desktop
GET / HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate, compress
Host: www.linkedin.com
User-Agent: Mozilla/5.0 (Mobile; rv:18.0) Gecko/18.0 Firefox/18.0

HTTP/1.1 200 OK
Cache-Control: no-cache, no-store
Connection: keep-alive
Content-Encoding: gzip
Content-Language: en-US
Content-Type: text/html;charset=UTF-8
Date: Thu, 27 Feb 2014 05:30:44 GMT
Expires: Thu, 01 Jan 1970 00:00:00 GMT
P3P: CP="CAO DSP COR CUR ADMi DEVi TAIi PSAi PSDi IVAi IVDi CONi OUR DELi SAMi UNRi PUBi OTRi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT POL PRE"
Pragma: no-cache
Server: Apache-Coyote/1.1
Set-Cookie: _lipt=deleteMe; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: leo_auth_token="GST:9vzoxiPlVk9pckTxWezoc1-x-fQh6LfQqBkE_UDZZK3P-ATQFKTdp1:1393479044:337b364a130efc8a6ca06f4a986c541a54a4219c"; Version=1; Max-Age=1799; Expires=Thu, 27-Feb-2014 06:00:43 GMT; Path=/
Set-Cookie: sl="delete me"; Version=1; Max-Age=0; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: sl="delete me"; Version=1; Domain=.www.linkedin.com; Max-Age=0; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: s_leo_auth_token="delete me"; Version=1; Max-Age=0; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: JSESSIONID="ajax:3144143918955960322"; Version=1; Path=/
Set-Cookie: visit="v=1&G"; Version=1; Max-Age=63072000; Expires=Sat, 27-Feb-2016 05:30:44 GMT; Path=/
Set-Cookie: bcookie="v=2&745de2f3-431f-4c45-8391-5961f7e74de8"; domain=.linkedin.com; Path=/; Expires=Sat, 27-Feb-2016 17:08:16 GMT
Set-Cookie: bscookie="v=1&20140227053044ef30b619-f5f8-4350-8798-f0b3cf7d650fAQH7Vn1qi1xTpiUy0F7kfHZ3TyV64Wby"; domain=.www.linkedin.com; Path=/; Secure; Expires=Sat, 27-Feb-2016 17:08:16 GMT; HttpOnly
Set-Cookie: lidc="b=LB86:g=54:u=1:i=1393479044:t=1393565444:s=3347685994"; Expires=Fri, 28 Feb 2014 05:30:44 GMT; domain=.linkedin.com; Path=/
Set-Cookie: X-LI-IDC=C1
Transfer-Encoding: chunked
Vary: Accept-Encoding
X-Content-Type-Options: nosniff
X-FS-UUID: a0f608e5cea15613b0b817b8462b0000
X-Frame-Options: SAMEORIGIN
X-LI-UUID: oPYI5c6hVhOwuBe4RisAAA==
X-Li-Fabric: PROD-ELA4
X-Li-Pop: PROD-ELA4
Whiteboard: [uaoverride] [country-all] [sitewait] [clientsniff] [lib-yui] → [uaoverride] [country-all] [contactready] [serversniff] [lib-yui]
Summary: linkedin.com doesn't recognize B2G UA as mobile → linkedin.com doesn't recognize Firefox OS UA as mobile
Recontacted the person I know at linkedin with my new findings.
Is there any update?
Flags: needinfo?(kdubost)
CodingFree: No update.
Let me try something else.
Flags: needinfo?(kdubost)
:karlcow, was there any success?
Flags: needinfo?(kdubost)
CodingFree, nope.
I asked for a direct contact with the CEO but didn't get an answer yet.
No need to ping though. :) 
I usually update when there is new information. 
You are welcome to try also on your side, maybe you will have more luck,
 Thanks.
Flags: needinfo?(kdubost)
Blocks: 1021132
It is fixed, almost for me. Linkedin now works in my Geeksphone Keon using B2G 2.0+.
s/almost/at least/
CodingFree: that's probably because of the UA override - the browser on your Keon pretends it's Firefox on Android when you visit linkedin.com, and you get the expected mobile content because LinkedIN's backend sees the word "Android" and thinks "smartphone!"
Blocks: 1040983
Contacting someone else.
https://mobile.twitter.com/MozWebCompat/status/526714175591317504
Flags: needinfo?(vphan)
On IRC, Hallvord suggested we removed the UA override because of Bug 1021132 
It's a good suggestion.

The Android spoof doesn't improve anything for the user experience. It makes it even worse.
One step forward, two steps back: linkedin fixed their sniffing, Firefox OS is now detected as mobile. However it now gets the white-screen-after-login treatment :-/

Will open a new bug on that.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Seems I was fooled by the stubborn persistence of a spoof that we thought we had removed.. :-/
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Status: REOPENED → NEW
See Also: → 964080
Priority: -- → P5
Closing as we are not working on Firefox OS anymore.
Status: NEW → RESOLVED
Closed: 9 years ago6 years ago
Resolution: --- → WONTFIX
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.