Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Update UA for Firefox Reality #478

Closed
larsbergstrom opened this issue Sep 6, 2018 · 6 comments
Closed

Update UA for Firefox Reality #478

larsbergstrom opened this issue Sep 6, 2018 · 6 comments
Assignees
Labels
P1 Fix in the current development iteration
Milestone

Comments

@larsbergstrom
Copy link

UA POR for Firefox Reality

FOR 1.0:

  • Use default Mobile UA string for 1.0
  • GeckoView's Default (Mobile) UA string is: Mozilla/5.0 (Android 9; Mobile; rv:63.0) Gecko/63.0 Firefox/63.0 (default cannot be changed per GV policy)

For 1.1

Add an override list for key sites to send alternate UA string to:

  • If site is in override list, send one of the following two UA strings:
    -- Mobile UA + "VR" String = Mozilla/5.0 (Mobile VR; rv: 63.0) Gecko/63.0 Firefox/63.0
    -- Desktop UA String = Mozilla/5.0 (VR; rv: 63.0) Gecko/63.0 Firefox/63.0
  • Will add UA string tracking field to Content Feed Airtable to track which works best during testing

Additional feature work:

  • implement design to allow users to select preferred site (desktop vs. mobile) and save preference
  • implement telemetry to collect data about user preferences on per-site rendering preference
  • implement ability for GV to request different Viewport sizes with any UA string (whether Desktop or Mobile)
  • implement ability for GV to override Viewport size if website does not respect request (edited) (edited)

Related issue:

@larsbergstrom larsbergstrom added the P0 Hotfix or blocker during release preparation label Sep 6, 2018
@larsbergstrom larsbergstrom added this to the V1.0 milestone Sep 6, 2018
@larsbergstrom
Copy link
Author

cc @bluemarvin @cvan Would it possible to get some comments/opinions here, especially for V1? I think the biggest tradeoff is do we:

  1. "Just" use the mobile UA as default
  2. Change the VR string to be mobile plus vr and make that the default

@bluemarvin
Copy link
Contributor

Switching back to the mobile UA is easiest. To get the VR mobile UA will require some GV work. I assume that means using the mobile viewport with the VR mobile UA. Only desktop UA will not use the mobile viewport.

@cvan
Copy link
Contributor

cvan commented Sep 6, 2018

Have we considered/allowed to send an additional request header VR-Supported: true/VR-Supported: 1.1 or VR-User-Agent: true?

Not that it's a great idea, but it would help servers conditionally serve pages to VR browsers, and if adopted, users could be served a page served for WebVR-optimised more immediately. It doesn't fix the existing sites (using the mobile UA like Oculus Browser and Samsung Browser do), but it could help us as we help sites make their sites more responsive and adaptive to VR browsers, instead of assuming mobile or desktop.

That would help for UA-to-server negotiation.

As discussed in prior conversations, in terms of client-side detection, CSS media queries could be used. (See w3c/csswg-drafts#2723 and w3c/csswg-drafts#2719.)

There's environment-blending:

@media (environment-blending: <value>) {
}

And @custom-media media queries and media features:

@media immersive, screen, projection {
}

Or:

<link rel="stylesheet" media="screen and (immersive)" href="example.css">

Thoughts?

@larsbergstrom
Copy link
Author

Let's go ahead with just changing the default UA to the mobile one, as @bluemarvin suggested.

@cvan I love these ideas (and basically anything we can do to avoid too much UA sniffing)! I assume that those changes would require some Gecko-side updates, but we should absolutely dig in on them for V1.1.

@larsbergstrom
Copy link
Author

This is done for 1.0 (thanks @bluemarvin!), so moving to 1.1.

@larsbergstrom larsbergstrom removed the P0 Hotfix or blocker during release preparation label Sep 8, 2018
@larsbergstrom larsbergstrom modified the milestones: V1.0, v1.1 Sep 8, 2018
@larsbergstrom
Copy link
Author

@avrignaud @bluemarvin @cvan

We should get our 1.1 plan ironed out here :-)

Last I heard was that we should:

  • Add vr to the mobile string and use that as our VR user agent, until such time as sites can do better feature-detection
  • Change the default in FxR to the new mobile+vr UA string

Has that changed?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P1 Fix in the current development iteration
Projects
None yet
Development

No branches or pull requests

4 participants