• Hello,

    I have a problem with my website. When I use Page Speed Insight, it is said that that I have a problem with my meta viewport tag :

    <meta name=”viewport” content=”user-scalable=no, width=device-width, maximum-scale=1, minimum-scale=1″>

    When I check the code I can see this too. However, when I tried to fix the problem in the header.php file in my astra theme, I saw that everything was correct <meta name=”viewport” content=”width=device-width, initial-scale=1″> !

    So I don’t understand how to fix the problem and where to find the file where I have to modify the code to correct the meta viewport. Everything seems to be correct in my header.php file while Page speed insight indicates that there is a problem…

    Could you please help me ?

    Thank you !

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter leo150595

    (@leo150595)

    Is there someone to help me for this specific topic ? I’m very lost ??

    Thank you !

    Hi @leo150595,

    I have tried reviewing the source code of the page but unfortunately, couldn’t observe any such code. You can also have a look here. Furthermore, I can see that it is coming is also coming from the script tag.

    Since you are also unable to find the code in the theme files, it might be coming from a different source. To check this, please try deactivating all the plugins and then testing the website on the page speed insights tool.

    Also, let me know if I missed anything.

    Best regards,
    Aradhy

    Thread Starter leo150595

    (@leo150595)

    Hello @bsfaradhy

    Thank you very much for your help ! When I inspect the code I have this (see below)

    As you can see, I have the following meta viewport in the header : <meta name=”viewport” content=”user-scalable=no, width=device-width, maximum-scale=1, minimum-scale=1″>

    While in my header.php file I have this : <meta?name=”viewport”?content=”width=device-width,?initial-scale=1″>

    I did what you said (desactivate all the plugins) but nothing changed. I still have this problem.

    As you think, I guess that it comes from another file but I checked almost everything and I can’t find where the problem comes from. I checked in functions.php assets and so on… And I found nothing…

    The only information I found related to viewport was this one in wp-content / Themes / astra /assets/js/unminified/frontend.js

    Its’ this piece of code : Line 494 : ?var?mobile_width?=?(?null?!==?navigator.userAgent.match(/Android/i)?&&?‘Android’?===?navigator.userAgent.match(/Android/i)[0]?)???window.visualViewport.width?:?window.innerWidth;

    and Line 506 : var?mobileResizeWidth?=?(?null?!==?navigator.userAgent.match(/Android/i)?&&?‘Android’?===?navigator.userAgent.match(/Android/i)[0]?)???window.visualViewport.width?:?window.innerWidth;

    Do you have another idea of what I could do ?

    Thank you !

    Hi @leo150595,

    I noticed you’re still on Astra v4.3.1. While I don’t believe this version is causing the issue, it’s always a good idea to update to the latest version. If updating doesn’t resolve the problem, I recommend opening a ticket from our support portal for further assistance.

    Kind regards,
    Aradhy

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.