title: clientWidth,screen.width,android Chrome and viewport
body: <p>I have 3 sub questions. I ran the following javascripts on my android phone(720*1280) with android Chrome. I ran it when the page start to load and within windown.onload.But i got strange results as below.</p>
  
  <ol>
  <li>How come the body.clientwidth is larger than screen.width(I got the same results no matter if viewport meta is added or not)?</li>
  <li>Why it returns 360*640 on android Chrome while it returns correct resolution on the other browser like UC? How can i get the correct resolution with android chrome?</li>
  <li>I always got the same results on all browsers even when i set a viewport meta with device-width=320px; How come the viewport doesn't take effect?</li>
  <li>document.body.clientHeight returns different value when execute it in window.onload which is larger. Why is that?</li>
  </ol>
  
  
  
  <pre><code>//execute with Android UC browser when page starts to load
  document.writeln(window.screen.width);
  document.writeln("&lt;br /&gt;");
  document.writeln(window.screen.height);
  document.writeln("&lt;br /&gt;");
  document.writeln(document.body.clientWidth);
  document.writeln("&lt;br /&gt;");
  document.writeln(document.body.clientHeight);
  
  720
  1280
  964
  114
  
  //execute with Android UC browser in window.onload
  document.writeln(window.screen.width);
  document.writeln("&lt;br /&gt;");
  document.writeln(window.screen.height);
  document.writeln("&lt;br /&gt;");
  document.writeln(document.body.clientWidth);
  document.writeln("&lt;br /&gt;");
  document.writeln(document.body.clientHeight);
  
  720
  1280
  964
  266
  
  //execute in Android Chrome when page starts to load
  document.writeln(window.screen.width);
  document.writeln("&lt;br /&gt;");
  document.writeln(window.screen.height);
  document.writeln("&lt;br /&gt;");
  document.writeln(document.body.clientWidth);
  document.writeln("&lt;br /&gt;");
  document.writeln(document.body.clientHeight);
  360
  640
  360
  640
  32
  964
  132
  
  //execute in Android Chrome window.onload
  document.writeln(window.screen.width);
  document.writeln("&lt;br /&gt;");
  document.writeln(window.screen.height);
  document.writeln("&lt;br /&gt;");
  document.writeln(document.body.clientWidth);
  document.writeln("&lt;br /&gt;");
  document.writeln(document.body.clientHeight);
  360
  640
  360
  640
  32
  964
  308
  </code></pre>