Feature policy ch-viewport-width weird behavior
diz000 opened this issue · 1 comments
Describe the bug
On a website with client hint ch-viewport-width enabled the browser sends wrong Viewport-Width header on image and video requests on mobile devices. Works correctly on desktop chrome.
Tested on a very simple HTML page, with 1 <img> and 1< video> in it. And another <img> is dynamically added after 2 seconds. Also with and without <meta name="viewport" content="width=device-width, initial-scale=1.0"> present in <head>
Case 1: <meta> tag is present in <head>
The Viewport-Width header always has a 980 value on the initial image and a correct value (depending on the mobile device) on the video request.
The dynamically added image has the correct value
Case 2: <meta> tag is not in <head>
Completely OPPOSITE situation.
The Viewport-Width header has a correct value on the initial image and 980 on the video request.
The dynamically added image also has 980 value
Is this a bug? If not, can someone explain why this is happening?
To Reproduce
Steps to reproduce the behavior:
- Open any website with client hint ch-viewport-width enabled
- Open network tab in devtools and click on any image or video request
- Scroll down to Request Headers
- See the Viewport-Width header
Expected behavior
Correct viewport-width value
Desktop (please complete the following information):
Works correctly in desktop chrome.
But you can see this behavior if you emulate any mobile device
Smartphone (please complete the following information):
- Device: Samsung galaxy S23
- OS: 13.0
- Browser chrome
- Version latest
or any other mobile device
This repo was for issues with the site at developer.chrome.com, please report Chrome issues at crbug.com