fb_pixel

How to do when loading the display of the site 480px on the iphone (320px), so that the scale is adjusted as soon as necessary?

Development | Web Development
Description
The project has an adaptive, but the design is at least 480px, made the adaptive all right, but on the iphone(also other devices whose width is less than 480px), the cropped page is displayed until you scale down. How to make, that at loading the scale as it is necessary at once adjusted?
Attachments
No attachments
Info
Description
Hold father! Verified.
<head>
  <script>
      var metaTag=document.createElement('meta');
      metaTag.name="viewport";
      if(screen.width<=479) {
          metaTag.content="width=480, user-scalable=false"
          window.addEventListener("orientationchange", function() {
              viewport=document.querySelector("meta[name=viewport]");
              if(window.orientation === 90 || window.orientation === -90) {
                  viewport.setAttribute('content','width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=false');
              } else {
                  viewport.setAttribute('content','width=480, user scalable=false');
              };
          }, false);
      } else {
          metaTag.content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=false"
      };
      document.getElementsByTagName('head')[0] .appendChild(metaTag);
  </script>
</head>

on April 29th, 2020 (10:28 pm)
All coments
This job has not been commented yet.