Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Does Googlebot-Mobile have a viewport resolution it sends across? If so, what is it?

It's a general question with broad relevance, but I am asking with reference to responsive design: particularly when serving different image resolution to different viewports via JavaScript.

While Googlebot has its issues with JavaScript, it will become better with time. Thus, it would be good to know which version of the same image would be crawled (since most responsive image JS solutions base their logic on resolution).

Feature phones Googlebot-Mobile:

SAMSUNG-SGH-E250/1.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 UP.Browser/6.2.3.3.c.1.101 (GUI) MMP/2.0 (compatible; Googlebot-Mobile/2.1; +http://www.google.com/bot.html)

DoCoMo/2.0 N905i(c100;TB;W24H16) (compatible; Googlebot-Mobile/2.1; +http://www.google.com/bot.html)

Smartphone Googlebot-Mobile:

Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_1 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8B117 Safari/6531.22.7 (compatible; Googlebot-Mobile/2.1; +http://www.google.com/bot.html)
share|improve this question
up vote 7 down vote accepted

The current GoogleBot Smartphone agent, as tested with the 'Fetch as Google' Tool is essentially a fake iPhone using a headless Webkit Safari 6.0 Engine, running on a Linux x86_64 desktop machine.

The default non-responsive viewport width is that of an iPhone at 980px.

With a viewport <meta name="viewport" content="width=device-width, initial-scale=1"> applied, it has a Screen Size and CSS Pixel Display Resolution of an iPhone 5s at 320x568** pixels with a 2x Device Pixel Resolution emulation.

NB: The Engine does not support Touch nor window.orientation like an emulator would.

UPDATE: *As of Dec 2015, the bot has now been updated to a viewport size of 375x667 pixels (size of an iPhone 6) and the engine is now using a Pre-Blink Chromium engine with a v8 JS engine.

UPDATE 2: **As of April 18 2016, The size has changed again for a Nexus 5X screen size of 411x731 pixels and a new user agent. Noting that 411x731 is the screen size info. But the actual viewport size (clientWidth and clientHeight) are reported as 410x730px, with an emulated DPR (devicePixelResolution) of 2.625.

share|improve this answer
    
could you point me to the source of the update info about viewport size of 375x667 pixels? Google seems to ban me;) - can't find it – Evgeniy Apr 18 at 15:03
    
There is no official source from Google as far as screen size is concerned. If that's what you mean. However, I am updating my answer again as the size has now changed along with the userAgent, which was announced to be effective as of today. – hexalys Apr 19 at 1:38

Google's bots do not view a page in any resolution due to the fact they do not render the page as you would expect from a browser, therefor resolution is irevelant but you should aim for standard media queries that support a range of devices. Google's mobile bot will view the media queries you have in the CSS file and estiblish from the Max-width resolution what devices your site works.

So the only thing you need to know is how the media queries work, if your have a min-width:300px and a max-width:600px as your media query Google will be able to tell that you support iphones, blackberry and smartphones.

SOURCE

The max-width value of 640px shown above is an example, not a requirement. Our algorithms look for max-width values that can be reasonably expected to refer to smartphone screen resolutions, and we will try to monitor what typical mobile websites use and may update our algorithms accordingly in the future.

JavaScript

Ideally your pages should render completely without the use of JavaScript using no-js, Google is pretty limited in what it understands, Google can use CSS to understand media queries display:none on desktop and mobile but as far as detecting your JavaScript its impossible to say. Personally as I said I'd ensure that the page renders without JS and then just serve the same version for both mobile and desktop when JS is disabled.

share|improve this answer
    
This answer is now out of date, as Googlebot does render pages and even lets you see the results of the rendering in Google Search Console. – Stephen Ostermiller Apr 19 at 0:52
    
That's the fetch, and cache your mentioning through. Google doesn't need to render the pages the same way it does for us, the bot doesn't have eyes... it can make sense of the code without having to render the page in the same way it does for us. – Simon Hayter Apr 19 at 8:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.