Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'mobile' client hint to explainer and spec #8

Closed
wants to merge 15 commits into from

Conversation

amtunlimited
Copy link
Contributor

Add a boolean "mobile" client hint to the explainer and spec, which should cover a very large use case while revealing less entropy and acknowledging user preferences on the matter.

Possible questions include:

  • is this the right name for the header?
  • is a boolean the right call?
  • should there be a more rigid or specific definition of "mobile"?
  • does anything else need to be edited other than the specific values (and the FAQ)?

README.md Outdated Show resolved Hide resolved
@@ -127,6 +128,13 @@ accomplish this as follows:
```http
Sec-CH-UA-Model: "Pixel 2 XL"
```

5. The `Sec-CH-UA-Mobile` header field represents whether the user agent should receive a specifically "mobile"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Browsers distinguish between more than just Mobile or not Mobile -- there are also VR (and sometimes Mobile VR (some oculus and samsung devices) and TV <devicecompat> tokens (my phrase, I think Samsung calls it "UX RECOMMEND") in user agent strings, depending on form factor. Rather than a new boolean for each of those, it's probably better to abstract over that, if this extension seems useful.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Framing it in terms of UX recommendations might make sense. I like that semantic more than "This is mobile."

I wonder what granularity we could reasonably provide by default, though. This hint only makes sense if we're sending it by default, as developers can of course request actual viewport information directly. I worry that too many buckets will add enough entropy to make it unlikely we'd benefit users by shipping this without an opt-in.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was considering this too; making an enum or list of values as opposed to just a boolean. I liked that it was just one bit of information, but it may not be useful.

I do agree with @mikewest that if we make it an enum or even just a string, the balance of of entropy to usability will be rough. I also worry that feature creep might turn it into a mess of different values, way too specific values, and general compat mess.

There's also the issue that if someone decides to make a new value, no one else will use it and the default might be more or less useful than another more popular option (like if you're on a TV and the "mobile" version might be more useful the "desktop" version).

We could set up a preference order (like font-families in CSS), although that might make for more fingerprinting (?) it would make graceful failing of unknown values better.

@yoavweiss
Copy link
Collaborator

@amtunlimited - Can you join the WICG and link your GH account with your W3C one to appease the IPR bots?

@amtunlimited
Copy link
Contributor Author

@amtunlimited - Can you join the WICG and link your GH account with your W3C one to appease the IPR bots?

Done

@amtunlimited
Copy link
Contributor Author

@yoavweiss I appeased the bots. Sorry it took so long, I didn't realize you had to manually re-validate (and log in to do so)

@mikewest
Copy link
Member

Would you mind reformulating this PR against https://github.com/WICG/ua-client-hints/blob/master/index.bs? We're moving out of IETF and into Bikeshed... should be simple to pull it across, but apologies for the inconvenience!

@amtunlimited
Copy link
Contributor Author

No worries. It seems to be just markdown with some sugar on it, yes?

@mikewest
Copy link
Member

mikewest commented Nov 26, 2019 via email

@amtunlimited
Copy link
Contributor Author

That ought to do it? Had a weird merge conflict, I think it didn't like that I rebased in a weird way? IDK, but we're good now. Check my bikeshed though, I'm just going by example.

@mikewest
Copy link
Member

There does seem to be some merging weirdness. The diff looks very strange... I'll see what I can do about cleaning it up.

@yoavweiss
Copy link
Collaborator

I pushed some small changes directly this morning, just to test the travis auto-publish setup (spoiler: it is not working). If that's the source of weirdness, feel free to nuke them

mikewest pushed a commit that referenced this pull request Nov 27, 2019
@mikewest
Copy link
Member

I noticed. :)

I merged this manually. Hopefully we didn't lose anything interesting along the way...

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 6, 2019
Mobile is a boolean client hint that informs whether a "mobile" or
"desktop" user experience should be supplied.

Relevant changes to the spec can be found here:
WICG/ua-client-hints#8
That was manually added via this commit:
WICG/ua-client-hints@db6fab2

Bug: 928669
Change-Id: Ia983cfa516c28b6a747b270abcc44e71ed39e1b5
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 6, 2019
Mobile is a boolean client hint that informs whether a "mobile" or
"desktop" user experience should be supplied.

Relevant changes to the spec can be found here:
WICG/ua-client-hints#8
That was manually added via this commit:
WICG/ua-client-hints@db6fab2

Bug: 928669
Change-Id: Ia983cfa516c28b6a747b270abcc44e71ed39e1b5
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 9, 2019
Mobile is a boolean client hint that informs whether a "mobile" or
"desktop" user experience should be supplied.

Relevant changes to the spec can be found here:
WICG/ua-client-hints#8
That was manually added via this commit:
WICG/ua-client-hints@db6fab2

Bug: 928669
Change-Id: Ia983cfa516c28b6a747b270abcc44e71ed39e1b5
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 9, 2019
Mobile is a boolean client hint that informs whether a "mobile" or
"desktop" user experience should be supplied.

Relevant changes to the spec can be found here:
WICG/ua-client-hints#8
That was manually added via this commit:
WICG/ua-client-hints@db6fab2

Bug: 928669
Change-Id: Ia983cfa516c28b6a747b270abcc44e71ed39e1b5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1829793
Commit-Queue: Aaron Tagliaboschi <aarontag@chromium.org>
Reviewed-by: Yoav Weiss <yoavweiss@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#723037}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 9, 2019
Mobile is a boolean client hint that informs whether a "mobile" or
"desktop" user experience should be supplied.

Relevant changes to the spec can be found here:
WICG/ua-client-hints#8
That was manually added via this commit:
WICG/ua-client-hints@db6fab2

Bug: 928669
Change-Id: Ia983cfa516c28b6a747b270abcc44e71ed39e1b5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1829793
Commit-Queue: Aaron Tagliaboschi <aarontag@chromium.org>
Reviewed-by: Yoav Weiss <yoavweiss@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#723037}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Dec 11, 2019
Automatic update from web-platform-tests
Implement `Sec-CH-UA-Mobile`

Mobile is a boolean client hint that informs whether a "mobile" or
"desktop" user experience should be supplied.

Relevant changes to the spec can be found here:
WICG/ua-client-hints#8
That was manually added via this commit:
WICG/ua-client-hints@db6fab2

Bug: 928669
Change-Id: Ia983cfa516c28b6a747b270abcc44e71ed39e1b5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1829793
Commit-Queue: Aaron Tagliaboschi <aarontag@chromium.org>
Reviewed-by: Yoav Weiss <yoavweiss@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#723037}

--

wpt-commits: 98e81ec707999187b087b3671e93a3625188b35a
wpt-pr: 19701
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Dec 12, 2019
Automatic update from web-platform-tests
Implement `Sec-CH-UA-Mobile`

Mobile is a boolean client hint that informs whether a "mobile" or
"desktop" user experience should be supplied.

Relevant changes to the spec can be found here:
WICG/ua-client-hints#8
That was manually added via this commit:
WICG/ua-client-hints@db6fab2

Bug: 928669
Change-Id: Ia983cfa516c28b6a747b270abcc44e71ed39e1b5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1829793
Commit-Queue: Aaron Tagliaboschi <aarontagchromium.org>
Reviewed-by: Yoav Weiss <yoavweisschromium.org>
Reviewed-by: Dominick Ng <dominicknchromium.org>
Reviewed-by: Avi Drissman <avichromium.org>
Reviewed-by: Takashi Toyoshima <toyoshimchromium.org>
Cr-Commit-Position: refs/heads/master{#723037}

--

wpt-commits: 98e81ec707999187b087b3671e93a3625188b35a
wpt-pr: 19701

UltraBlame original commit: a75eb297546190b81743b4452c12a79e7e87aa53
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Dec 12, 2019
Automatic update from web-platform-tests
Implement `Sec-CH-UA-Mobile`

Mobile is a boolean client hint that informs whether a "mobile" or
"desktop" user experience should be supplied.

Relevant changes to the spec can be found here:
WICG/ua-client-hints#8
That was manually added via this commit:
WICG/ua-client-hints@db6fab2

Bug: 928669
Change-Id: Ia983cfa516c28b6a747b270abcc44e71ed39e1b5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1829793
Commit-Queue: Aaron Tagliaboschi <aarontagchromium.org>
Reviewed-by: Yoav Weiss <yoavweisschromium.org>
Reviewed-by: Dominick Ng <dominicknchromium.org>
Reviewed-by: Avi Drissman <avichromium.org>
Reviewed-by: Takashi Toyoshima <toyoshimchromium.org>
Cr-Commit-Position: refs/heads/master{#723037}

--

wpt-commits: 98e81ec707999187b087b3671e93a3625188b35a
wpt-pr: 19701

UltraBlame original commit: a75eb297546190b81743b4452c12a79e7e87aa53
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Dec 12, 2019
Automatic update from web-platform-tests
Implement `Sec-CH-UA-Mobile`

Mobile is a boolean client hint that informs whether a "mobile" or
"desktop" user experience should be supplied.

Relevant changes to the spec can be found here:
WICG/ua-client-hints#8
That was manually added via this commit:
WICG/ua-client-hints@db6fab2

Bug: 928669
Change-Id: Ia983cfa516c28b6a747b270abcc44e71ed39e1b5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1829793
Commit-Queue: Aaron Tagliaboschi <aarontagchromium.org>
Reviewed-by: Yoav Weiss <yoavweisschromium.org>
Reviewed-by: Dominick Ng <dominicknchromium.org>
Reviewed-by: Avi Drissman <avichromium.org>
Reviewed-by: Takashi Toyoshima <toyoshimchromium.org>
Cr-Commit-Position: refs/heads/master{#723037}

--

wpt-commits: 98e81ec707999187b087b3671e93a3625188b35a
wpt-pr: 19701

UltraBlame original commit: a75eb297546190b81743b4452c12a79e7e87aa53
jamienicol pushed a commit to jamienicol/gecko that referenced this pull request Dec 16, 2019
Automatic update from web-platform-tests
Implement `Sec-CH-UA-Mobile`

Mobile is a boolean client hint that informs whether a "mobile" or
"desktop" user experience should be supplied.

Relevant changes to the spec can be found here:
WICG/ua-client-hints#8
That was manually added via this commit:
WICG/ua-client-hints@db6fab2

Bug: 928669
Change-Id: Ia983cfa516c28b6a747b270abcc44e71ed39e1b5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1829793
Commit-Queue: Aaron Tagliaboschi <aarontag@chromium.org>
Reviewed-by: Yoav Weiss <yoavweiss@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#723037}

--

wpt-commits: 98e81ec707999187b087b3671e93a3625188b35a
wpt-pr: 19701
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants