Closed Bug 827636 Opened 12 years ago Closed 11 years ago

youtube.com doesn't recognize B2G UA as mobile

Categories

(Web Compatibility :: Mobile, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: lmandel, Unassigned)

References

()

Details

(Whiteboard: [uaoverride] [country-all] [serversniff])

youtube.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.
Blocks: youtube.com
Whiteboard: [uaoverride]
Here's a pointer to our UA reference: https://developer.mozilla.org/en-US/docs/Gecko_user_agent_string_reference Specifically, it looks like this: "Mozilla/5.0 (Mobile; rv:15.0) Gecko/18.0 Firefox/18.0"
We currently override the UA to prevent this. So youtube.com receives: "Mozilla/5.0 (Android; Mobile; rv:15.0) Gecko/18.0 Firefox/18.0
(In reply to Anthony Ricaud (:rik) from comment #2) > We currently override the UA to prevent this. So youtube.com receives: > "Mozilla/5.0 (Android; Mobile; rv:15.0) Gecko/18.0 Firefox/18.0 This is intentional. We haven't had a clear request for YouTube for our mobile clients. I spoke with the Firefox for Android team about their requirements. I still need to speak with the Firefox OS team. Once we're clear on the request, we can talk to YouTube and making the changes to support our platform.
(In reply to Lawrence Mandel [:lmandel] from comment #3) > (In reply to Anthony Ricaud (:rik) from comment #2) > > We currently override the UA to prevent this. So youtube.com receives: > > "Mozilla/5.0 (Android; Mobile; rv:15.0) Gecko/18.0 Firefox/18.0 > > This is intentional. We haven't had a clear request for YouTube for our > mobile clients. I spoke with the Firefox for Android team about their > requirements. I still need to speak with the Firefox OS team. Once we're > clear on the request, we can talk to YouTube and making the changes to > support our platform. See my email started on this with some of the FF OS guys. This has become a bit more urgent to resolve due to a corp bug filed about our YouTube usage on FF OS.
(In reply to Jason Smith [:jsmith] from comment #4) > See my email started on this with some of the FF OS guys. This has become a > bit more urgent to resolve due to a corp bug filed about our YouTube usage > on FF OS. Agreed. Thanks for pushing to get an answer so that we can get back in touch with YouTube.
Blocks: b2g-youtube
Depends on: 887454
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
We've been treating the evangelism bugs separate from the bugs to modify the UA override list. Not that it's a big deal but I'm going to resolve this as fixed.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Status: REOPENED → RESOLVED
Closed: 11 years ago11 years ago
Resolution: --- → FIXED
Ok. Regardless, we did the evangelism :)
Yes. And much thanks for all the work here.
Whiteboard: [uaoverride] → [uaoverride] [country-all] [serversniff]
Product: Tech Evangelism → Web Compatibility

Where to modif the userAgent from source code? Could someone mention the path to the file in source code? I want to add "Android" string along with userAgent. Someone please help

Flags: needinfo?(riksoft)
Flags: needinfo?(miket)
Flags: needinfo?(21)

(In reply to hari.vinu.4 from comment #10)

Where to modif the userAgent from source code? Could someone mention the path to the file in source code? I want to add "Android" string along with userAgent. Someone please help

I have nothing to do with this bug. However to change UA I suggest you the addon user-agent switcher. See ya!

Flags: needinfo?(riksoft)

(In reply to Rik from comment #11)

(In reply to hari.vinu.4 from comment #10)

Where to modif the userAgent from source code? Could someone mention the path to the file in source code? I want to add "Android" string along with userAgent. Someone please help

I have nothing to do with this bug. However to change UA I suggest you the addon user-agent switcher. See ya!

Hi Rik, Thanks for your reply. But currently Im running the browser on an emulator. Addon addition is difficult there. I thought someone could guide me where to change this in source code(some file where I can modify userAgent string). I just tagged people who have replied to this post before:)

https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsHttpHandler.cpp#966 is where that happens.

You can also just set general.useragent.override if you don't want to have to re-build Gecko https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsHttpHandler.cpp#884

I forget where the mobile prefs file is in B2G, but if you want to take that approach you can do something like pref("general.useragent.override", "cool-new-UA-string");

https://bugzilla.mozilla.org/show_bug.cgi?id=820699#c2 might be useful for that approach, but I haven't tried it.

Flags: needinfo?(miket)
Flags: needinfo?(21)
You need to log in before you can comment on or make changes to this bug.