Googlebot Running Javascript

January 11th, 2012
tech
If you search Google for site:www.jefftk.com [1], the sixth result is currently:
The text it's showing for the description is from a comment. This is strange, because the comments from my posts are pulled in from from Facebook and Google Plus via javascript. So in the indexing process Google is running this script on another server, computing the change to the page that the "document.write" makes, and saving the text as the post-javascript page.

I can see how in the modern javascript-everywhere web this helps people get better search results, but this feels erie. It's a violation of how I expect bots to work. Next we'll see Google having indexed pages that require form submissions to get to.

Update 2012-01-11: The example above of javascript is from a Google+ comment, and while I think it's unlikely that Google is using G+ comments on link shares to pull up results, to test this I checked whether it also could pull things out of Facebook comments. It can:


[1] Why was I doing this? I recently added a <meta name="description" content="[first 400 characters of post]" /> to my blog entries because Google was putting the header ("  ::  Blog Posts  ::  RSS Feed ...") into the search results and I wanted to tell it where the real text started:

The change seems to have fixed some results but not all of them. They previously all looked like the image above, but now some are the beginning of the text, as 'description' should hint:
Referenced in: Comments Are Now First Names

Comment via: google plus, facebook

Recent posts on blogs I like:

Steve Ballmer was an underrated CEO

There's a common narrative that Microsoft was moribund under Steve Ballmer and then later saved by the miraculous leadership of Satya Nadella. This is the dominant narrative in every online discussion about the topic I've seen and it's a commo…

via Posts on October 28, 2024

Weird People of History: Jenny from the Jane Abortion Collective

Direct action when abortion was illegal

via Thing of Things October 24, 2024

Inner dialogue, walking down the sidewalk

A discussion I have with myself a lot The post Inner dialogue, walking down the sidewalk appeared first on Otherwise.

via Otherwise October 10, 2024

more     (via openring)