Can useSSRWidth throw off the google or other robots for responsive checking? #5044
Replies: 1 comment
-
|
Hi @jesspinklet! I'm Dosu and I’m helping the vueuse team. Setting a static width with useSSRWidth during SSR means your server-rendered HTML will always reflect that specific viewport size, regardless of who is requesting it. This can affect how Google or other robots perceive your site's responsiveness, especially if they do not execute client-side JavaScript or only analyze the initial HTML/CSS. useSSRWidth does not adapt based on user agent or robot—it just provides whatever static width you configure, and there’s no built-in logic to vary it for crawlers or different devices (source, docs). For most SEO and responsive checks, Googlebot is capable of rendering JavaScript and will eventually see your client-side layout. However, some tools and bots only look at the SSR output. If you always set a static width (like 500px or 1200px), the initial render will look like that size, which could make your site appear non-responsive to those bots. Best practice: pick a reasonable default SSR width that matches your most common device or layout, or implement logic to vary the SSR width per request if you need more accurate simulation for different user agents. If you care about how robots see your responsive design, be aware that useSSRWidth alone won’t handle this for you—you’d need to add your own logic if you want to serve different SSR widths for different scenarios (media query docs). To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I was curious to see if that effect the robots as well or not. like they need to check the website for both responsive and normal version as well. So, is setting a new static width okay?
Beta Was this translation helpful? Give feedback.
All reactions