This document discusses the relationship between JavaScript and SEO. It describes how Googlebot crawls and renders pages with JavaScript differently than regular HTML pages, taking more time. This can lead to issues like incomplete indexing if the JavaScript is not optimized for search engines. The document provides examples of companies that experienced drops in organic traffic and keyword rankings due to JavaScript rendering problems. It also offers suggestions on approaches like server-side rendering, prerendering, and isomorphic JavaScript to help search engines properly crawl and index JavaScript-heavy sites.
13. @impressiontalk
hello@impression.co.uk
Crawling HTML
1. Googlebot downloads the HTML
1. Googlebot extracts the links from the source code
1. Googlebot downloads the CSS Files
1. Googlebot sends all the downloaded resources to the
indexer
1. The indexer then indexes the page
14. @impressiontalk
hello@impression.co.uk
Crawling JS vs HTML
1. Googlebot downloads the HTML
1. Googlebot downloads the CSS and Javascript.
1. Googlebot uses their Web Rendering Service to parse, compile and
execute Javascript code.
1. The WRS fetches data from external APIs
1. The Indexer can now index the content
1. Google can discover new links and add it to Googlebot’s crawling
queue
39. @impressiontalk
“No exact timeout is specified, but it’s said that
Google can’t wait for a script longer than 5
seconds. Our experiments confirm this rule”
- Elephate
@impressiontalk
Crawl Rate
40. @impressiontalk
A slow website will impact Google
rendering your content and also slow
down the crawling process
@impressiontalk
Crawl Rate
46. @impressiontalk
@impressiontalk
Server Side vs Client Side
SSR
Googlebot receives the HTML that
describes the page
CSR
Initial load can lead to blank pages
which will be served to Googlebot
47. @impressiontalk
@impressiontalk
Client Side Rendering
Prerendering
● This serves a HTML snapshot
to Googlebot
● Pre-render.io
● PhantomJS & Chrome
Headless
Isomorphic Javascript
● Both user and search engine
receive full page of content
then JS features are loaded.
● Recommended by Google
● Can be difficult to implement