Dumb SEO Questions

(Entry was posted by Edwin Jonk on this post in the Dumb SEO Questions community on Facebook, 02/04/2015).

Precomposing a SPA may become the Holy Grail to SEO

To snapshot or not to snapshot

Googlebot is getting smarter and smarter when it comes to JavaScript. A good solution to make sure Googlebot would understand automatically updated content generated by users (like comments) was/is to make a HTML snapshot.

But these days I am like Richard Hearne , not sure. Nicolai Kamenzky - "Precomposing" a SPA may become the Holy Grail to SEO
This question begins at 04:00:00 into the clip. Did this video clip play correctly? Watch this question on YouTube commencing at 04:00:00
Video would not load
I see YouTube error message
I see static
Video clip did not start at this question

YOUR ANSWERS

Selected answers from the Dumb SEO Questions Facebook & G+ community.

  • Edwin Jonk: To snapshot or not to snapshot

    Googlebot is getting smarter and smarter when it comes to JavaScript. A good solution to make sure Googlebot would understand automatically updated content generated by users (like comments) was/is to make a HTML snapshot.

    But these days I am like +Richard Hearne ;, not sure.
  • Richard Hearne: After more digging I found this:

    Googlebot executes JavaScript if either:

    A script is loaded via a <script> tag and executed right after being loaded (e.g. via an IIFE),
    A function is bound to and executed on the 'DOMContentLoaded' event, or
    A function is bound to and executed on the window.onload event.

    The Googlebot does NOT execute JavaScript if either:

    The code is executed after an AJAX call returns or
    The code is executed after a timeout.

    Based on the above anything loaded via AJAX would not be indexed, whereas anything loaded synchronously and executed prior to or at DOMContentLoaded or window.onload.  ;I'm not a dev so I may have this wrong, but from the looks of things Disqus uses an XHR object to load comments (so not indexed unless you use their API to load into rendered HTML), while other techniques will render comments to DOM before onload, and these are indeed indexed by Google.

    I'd still like to know if they pass signals across links rendered though. Might need to actually do some testing to find out.
  • Edwin Jonk: This post from Richard is a follow-up of ;https://plus.google.com/107360801496590056394/posts/EzfmRgstgwa

View original question in the Dumb SEO Questions community on Facebook, 02/04/2015).