title: JavaScript to set the initial Scale in <meta name="viewport"
body: <p>Is it possible to have a JavaScript function before the </p>
  
  <pre><code>&lt;meta name="viewport" content="width=device-width; initial-scale=1.0; "&gt;
  </code></pre>
  
  <p>to set the scale figures , to target each mobile device width correctly ? 
  For example in the JavaScript we have<br></p>
  
  <p><code>if (window.devicePixelRatio == 0.75)</code> <br></p>
  
  <p>we make the meta tag: </p>
  
  <pre><code>&lt;meta name="viewport" content="width=device-width; initial-scale=1.4; "&gt;
  </code></pre>
  
  <p>and <br></p>
  
  <pre><code> if (window.devicePixelRatio == 1.5)
  </code></pre>
  
  <p>we make the meta tag: <br></p>
  
  <pre><code>&lt;meta name="viewport" content="width=device-width; initial-scale= 0,75; "&gt;
  </code></pre>
  
  <p>so the page when it loads , it zoom in or out, to perfectly fit the device width.</p>
  
  <p>if that possible , would you please post an example .</p>