A little doubt about the viewport setting in meta

chrome browser, in mobile phone mode iphone6,
adds this sentence to the page
< meta name= "viewport" content= "width=device-width, initial-scale=0.5, maximum-scale=0.5, minimum-scale=0.5" >
. At this time, both window.innerWidth and document.documentElement.clientWidth are used to get 750,
but when all scale is changed to 2, window.innerWidth gets 188, while document.documentElement.clientWidth gets 375.
so, what is the reason for this?

Mar.07,2021

there are three viewport:
1 visual viewports (visual viewport) = window.innerWidht = Window.visualViewport.widht;
2 layout viewports (layout viewport) = document.documentElement.clientWidth;
3 ideal viewports such as iphone6 with a resolution of 375 667, the ideal viewport width is 375px;
Pixel ratio = ideal Viewport / Visual Viewport
layout Viewport = Max (ideal Viewport, Visual Viewport)
you can see that when all scale is changed to 2, the visual viewport is 188px and the layout viewport is 375px.
I guess so.

Menu