Questions tagged [client-hints]
28 questions
95
votes
1 answer
Why does Chrome use sec-ch-ua: "\"Not\\A;Brand";v="99"?
I understand that making user-agent hints more ambiguous is intended, in part, to make browser fingerprinting harder.
My own (Windows desktop) Chrome sends the headers:
user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,…

Sai
- 6,919
- 6
- 42
- 54
76
votes
7 answers
React 16: Warning: Expected server HTML to contain a matching in due to State
I'm getting the following error using SSR
Warning: Expected server HTML to contain a matching in .
The issue is on the client when checking the browser width on component mount, and then setting the state of a component to render a mobile…
Ivan M
- 867
- 1
- 6
- 8
37
votes
2 answers
accept Attribute in Microsoft Edge
Anyone know how to get accept working in Edge?
Works fine in Chrome 44, Firefox 39, IE 11, Opera 31.
Also tried
SavageCore
- 478
- 1
- 6
- 10
22
votes
6 answers
Efficiency of services like Cloudinary, Imgix
I want to build a website with a lot of images and hence image manipulations like amazon, ebay, flipkart,etc. I have been suggested to use services like Cloudinary, Imgix, etc to resize my images since it would be better to store one version of each…
deadcode
- 742
- 11
- 27
12
votes
1 answer
Why is Chrome sending sec-ch-ua and sec-ch-ua-mobile request headers although "Experimental Web Platform features" are disabled
I have the situation with Chrome, tested with 87.0.4280.88, that in some cases Chrome will send sec-ch-ua and sec-ch-ua-mobile request headers, although chrome://flags/#enable-experimental-web-platform-features is set to "disabled".
For…
ivicaa
- 605
- 1
- 6
- 17
8
votes
3 answers
Mobile device resolution (width, height) screen size header
It seems there is no real standard for specifying "screen-size" in a http header from a user agent.
For example, the two headers below:
X-UP-devcap-screenpixels: 320x240
or
UA-pixels: 320x240
are two commonly used headers.
The second is used by…
David d C e Freitas
- 7,481
- 4
- 58
- 67
5
votes
1 answer
Video Capture with UPLOAD for Windows 10+ Mobile
I've been researching Video Capture with UPLOAD for Windows 10 Mobile and it doesn't appear possible at the moment. I was using the following:
This allows you to select the mobile webcam as a source, but you can…
Philip Murphy
- 870
- 3
- 10
- 24
4
votes
1 answer
What Accept-CH values are equivilent to User-Agent for identifying a browser?
Chrome plans on deprecating and freezing its User-Agent header June, 2020. The User-Agent is useful when debugging certain errors from logs because many browsers have different quirks depending on the version. User-Agent is being deprecated in favor…
Uyghur Lives Matter
- 18,820
- 42
- 108
- 144
4
votes
4 answers
How does CSS resize images?
Let's say I have a image that's 1240x720 and I resize it to 1240x250 with CSS using height and width. I access my site and have to download it but, do I download the original one (1240x720) that then is resized on my browser or the already resized…
sysfiend
- 601
- 8
- 20
4
votes
1 answer
How to create offline apps with Service Worker and srcset?
I would like my app (a static web site) to run offline using a Service Worker. I can't see a way to do this without caching all the images from the srcset attribute. I can see how client hints would solve the problem but that apart is there a…
Tim Niblett
- 1,187
- 7
- 8
3
votes
0 answers
DPR & device width detection on server side(express or koa2, next.js)
I'm using adaptive.js on next.js - react project, heavily using server side feature for increasing 1st screen render speed.
adaptive.js with px2rem could make our team write css dimension exact as design draft from UED team. when adaptive.js init,…
Walter Wu
- 31
- 2
2
votes
1 answer
Declaring Feature-Policy (Permissions-Policy) headers in HTML meta tag
Is it possible to add feature policy headers by doing meta tag implementation? Apparently it didn't work for me with the following specific feature.
I'm trying to implement Client…
vptest
- 246
- 1
- 17
2
votes
3 answers
Accessibility: show content in modal on small devices, show content inline on large devices
I need to show certain content in a modal/fullscreen panel on small devices, triggered by a button. On large devices, this same content, is just always shown and the trigger is then hidden.
How do you approach this for accessibility?
Currently, I…
Bregt
- 161
- 1
- 10
2
votes
2 answers
Javascript test client side for HTTP Client Hints support
Is it possible to detect if a browser supports HTTP Client Hints using javascript? Right now only chrome appears to support it: http://caniuse.com/#feat=client-hints-dpr-width-viewport
So I was thinking of using some javascript library that can do…
abagshaw
- 6,162
- 4
- 38
- 76
1
vote
0 answers
Generate random client hints to match user agent in python
When sending http requests for an application I am developing, I want to use a random user agent. However, I also want to be able to send client hint request headers like 'sec-ch-ua' and 'sec-ch-ua-platform', and I want these client hints to be…
Harry Partridge
- 111
- 1
due to State
I'm getting the following error using SSR
Warning: Expected server HTML to contain a matching
in
.
The issue is on the client when checking the browser width on component mount, and then setting the state of a component to render a mobile…

Ivan M
- 867
- 1
- 6
- 8
37
votes
2 answers
accept Attribute in Microsoft Edge
Anyone know how to get accept working in Edge?
Works fine in Chrome 44, Firefox 39, IE 11, Opera 31.
Also tried

SavageCore
- 478
- 1
- 6
- 10
22
votes
6 answers
Efficiency of services like Cloudinary, Imgix
I want to build a website with a lot of images and hence image manipulations like amazon, ebay, flipkart,etc. I have been suggested to use services like Cloudinary, Imgix, etc to resize my images since it would be better to store one version of each…

deadcode
- 742
- 11
- 27
12
votes
1 answer
Why is Chrome sending sec-ch-ua and sec-ch-ua-mobile request headers although "Experimental Web Platform features" are disabled
I have the situation with Chrome, tested with 87.0.4280.88, that in some cases Chrome will send sec-ch-ua and sec-ch-ua-mobile request headers, although chrome://flags/#enable-experimental-web-platform-features is set to "disabled".
For…

ivicaa
- 605
- 1
- 6
- 17
8
votes
3 answers
Mobile device resolution (width, height) screen size header
It seems there is no real standard for specifying "screen-size" in a http header from a user agent.
For example, the two headers below:
X-UP-devcap-screenpixels: 320x240
or
UA-pixels: 320x240
are two commonly used headers.
The second is used by…

David d C e Freitas
- 7,481
- 4
- 58
- 67
5
votes
1 answer
Video Capture with UPLOAD for Windows 10+ Mobile
I've been researching Video Capture with UPLOAD for Windows 10 Mobile and it doesn't appear possible at the moment. I was using the following:
This allows you to select the mobile webcam as a source, but you can…

Philip Murphy
- 870
- 3
- 10
- 24
4
votes
1 answer
What Accept-CH values are equivilent to User-Agent for identifying a browser?
Chrome plans on deprecating and freezing its User-Agent header June, 2020. The User-Agent is useful when debugging certain errors from logs because many browsers have different quirks depending on the version. User-Agent is being deprecated in favor…

Uyghur Lives Matter
- 18,820
- 42
- 108
- 144
4
votes
4 answers
How does CSS resize images?
Let's say I have a image that's 1240x720 and I resize it to 1240x250 with CSS using height and width. I access my site and have to download it but, do I download the original one (1240x720) that then is resized on my browser or the already resized…

sysfiend
- 601
- 8
- 20
4
votes
1 answer
How to create offline apps with Service Worker and srcset?
I would like my app (a static web site) to run offline using a Service Worker. I can't see a way to do this without caching all the images from the srcset attribute. I can see how client hints would solve the problem but that apart is there a…

Tim Niblett
- 1,187
- 7
- 8
3
votes
0 answers
DPR & device width detection on server side(express or koa2, next.js)
I'm using adaptive.js on next.js - react project, heavily using server side feature for increasing 1st screen render speed.
adaptive.js with px2rem could make our team write css dimension exact as design draft from UED team. when adaptive.js init,…

Walter Wu
- 31
- 2
2
votes
1 answer
Declaring Feature-Policy (Permissions-Policy) headers in HTML meta tag
Is it possible to add feature policy headers by doing meta tag implementation? Apparently it didn't work for me with the following specific feature.
I'm trying to implement Client…

vptest
- 246
- 1
- 17
2
votes
3 answers
Accessibility: show content in modal on small devices, show content inline on large devices
I need to show certain content in a modal/fullscreen panel on small devices, triggered by a button. On large devices, this same content, is just always shown and the trigger is then hidden.
How do you approach this for accessibility?
Currently, I…

Bregt
- 161
- 1
- 10
2
votes
2 answers
Javascript test client side for HTTP Client Hints support
Is it possible to detect if a browser supports HTTP Client Hints using javascript? Right now only chrome appears to support it: http://caniuse.com/#feat=client-hints-dpr-width-viewport
So I was thinking of using some javascript library that can do…

abagshaw
- 6,162
- 4
- 38
- 76
1
vote
0 answers
Generate random client hints to match user agent in python
When sending http requests for an application I am developing, I want to use a random user agent. However, I also want to be able to send client hint request headers like 'sec-ch-ua' and 'sec-ch-ua-platform', and I want these client hints to be…

Harry Partridge
- 111
- 1