<meta name="viewport" content="width=1024">

visualViewport.width:

innerWidth:

documentElement.getBoundingClientRect().width:

devicePixelRatio:

documentElement.getBoundingClientRect():