logoalt Hacker News

netoltoday at 12:18 PM1 replyview on HN

This may be Safari-specific? Google recommends setting both: https://developer.chrome.com/docs/lighthouse/best-practices/...


Replies

OuterValetoday at 12:32 PM

You don't need both, but you should have the width set. From that page:

> A page fails the audit unless all of these conditions are met:

> - The document's <head> contains a <meta name="viewport"> tag.

> - The viewport meta tag contains a content attribute.

> - The content attribute's value includes the text width=.

I researched and tested this extensively the other day. `<meta name="viewport" content="width=device-width">` is all you need. https://vale.rocks/micros/20260902-1350

show 1 reply