htmlviewportpagespeedgoogle-pagespeedpagespeed-insights

Pagespeed: problem with "initial-scale" - Does not have a <meta name="viewport"> tag with width or initial-scale


I am working on a site that has a meta viewport tag with an initial-scale value of 0.8. The full tag is here:

<meta name="viewport" content="width=device-width,initial-scale=0.8,maximum-scale=5.0">

I cannot get Pagespeed insights to recognise this tag - I'm given the error "Does not have a tag with width or initial-scale". Pagespeed does, however, recognise the existence of this tag if I set initial-scale=1. I've tried reordering the parameters.

I can't find anywhere that states a value less than 1 is problematic, least of all in Google's Pagespeed documentation which states that the tag merely has to exist in order to be picked up.

Changing the value to 1 has the unfortunate effect of making the site appear jumbo size on mobile devices and breaks the layout.

What am I doing wrong? Have I misunderstood something about how this tag is supposed to work?

Thank you.


Solution

  • An initial-scale value of < 1 causes a 300ms delay which is bad for performance.

    This could be worded better in both the docs and the audit name.

    I've raised an internal change request for the docs and that should be published in the next few days.

    I've also raised this issue on the Lighthouse repo to rename the audit description.