Google bot delays executing JavaScript for days
itbrokeand.ifixit.com
itbrokeand.ifixit.com
> If you're removing code or changing an endpoint,
> be careful you don't screw the Google bot, which
> might be "viewing" 3-day-old pages on your
> altered backend.
An interesting proposition. Personally, unless I was operating in some sector where keeping Googlebot happy was key to staying competitive and there was solid evidence it could hurt my page rank, I don't think I'd be prepared to go to this length. Google is doing quite an atypical thing here compared to regular browsers and I'd like to think Google engineers are smart enough to account for this type of thing in the early stages of planning.They have a difficult cache invalidation problem here. The only way to find out if the Javascript in use on a site has changed is by checking if the page HTML has changed. And on top of that, the Javascript can change without any noticeable change to the HTML.
For example if I have a page: www.domain.com/xyz/123
Googlebot (without any links to other pages, will actually try URLs like) www.domain.com/xyz/1234 www.domain.com/xyz/122 www.domain.com/xyz/121 and so on...
It's crazy how much 'looking around' they do these days!
quick pjax e.g.:
<html data-lastupdated="1234567890"...
$.getJSON('/lastupdated.json', function(lastupdated) {
if(lastupdated > $('html').data('lastupdated'))
{
$('a[data-pjax]').removeAttr('data-pjax');
}
});Most of them are open from other tasks. But that doesn't make them a distraction. They're there for when the current task finishes and I can go back to them.
The alternative is to close them all down and reopen them, which is vastly more time consuming.
Perhaps Google fetches the crawled page from the cache and then renders that for the previews?
From: googlebot(at)googlebot.com
User-Agent: Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)At Blekko we post process extracted pages of the crawl which, if they were putting content behind js could result in js calls offset by the initial access but 3 days seems like a long time. Mostly though the js is just page animation.
I just checked one of my sites which loads available delivery dates via ajax through the google cache, and yep, it caches that as the dates are when the cache was taken.