Meta viewport tag: best practice

<meta name="viewport" content="width=device-width">


<meta name="viewport" content="width=device-width, initial-scale=1.0">

because in (Viewport meta tag - HTML: HyperText Markup Language | MDN)


Controls the zoom level when the page is first loaded. Minimum: 0.1. Maximum: 10. Default: 1. Negative values: ignored.

So, default is 1, do we need to specifically set it?
astro uses just width=device-width
MDN Best Practice
it’s same (without setting initial-scale)

Hi @cennedys

I think setting the value initial-scale to 1.0 is just redundant since 1.0 is the default. Set it if the value you want is different from the browser’s default. In programming, we need to avoid redundancy as much as possible.

1 Like

Yes, this is why I asked, because if initial-scale value is default 1.0, why should I set it!
Thank you!

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.