Unless > Science > Which search engines index Javascript

Which search engines index Javascript content?

Following up on our earlier experiments and for the purpose of validating the technical concepts behind our personalization platform Unless.com, here is a series of experiments to see what gets indexed and what doesn't if Javascript is used to inject content in your page. We are testing for Google, Bing (and Yahoo), Yandex and Baidu.

Experiments

Each experiment consists of a sentence with a unique string that gets injected by Javascript, using several different techniques. After indexing by the search bots, you can use this string to validate if the associated search results are showing up or not by simply performing a search query in each search engine - proving the Javascript indexing capabilities of each of those.

  1. Content injection before DOM has loaded
  2. Content injection after DOM has loaded
  3. Content injection by async Javascript
  4. Content injection after httpRequest
  5. Meta elements injection
  6. Meta elements injection, asynchronous
  7. Bonus: injection with an Unless variation

View the page source to find the script code for each experiment.

Injection before DOM has loaded

This experiment writes a string into a DIV element with Javascript synchronously. For the test to be succesful, the following content should get indexed.

Results

Injection after DOM has loaded

After the DOM has loaded, this experiment writes a string into a DIV element with Javascript. For the test to be succesful, the following content should get indexed.

Results

Asynchronous injection

After a time out of 1000 milliseconds, the experiment writes a string into a DIV element. For the test to be succesful, the following content should get indexed.

Results

Injection after httpRequest

This experiment loads a JSON file and then the callback function injects a DIV with a string using its data. For the test to be succesful, the following content should get indexed.

Results

Meta elements injection

Synchronously, the meta description was replaced by another one containing a unique string. For the test to be succesful, the following content should get indexed and shown as the description in the SERP. Compare the unique string. Note: the next experiment might overrule this one.

Results

Meta elements injection, asynchronous

Using a time-out function, the meta description was replaced with a new one, containing a unique string. For the test to be succesful, the following content should get indexed and shown as the description in the SERP. Compare the unique string. If this experiment is succesful, the previous one will also work.

Results

Bonus: injection by Unless variation

This experiment loads an Unless variation that contains a unique string. We prefer that the following content does not get indexed - because Unless variations should not be shown to search bots. Let's see.

Nothing here yet

Results

Conclusion

Google scores best on crawling and indexing of dynamic content. All content gets indexed, whether it is synchronous or asynchronous, or via http request or delayed otherwise. As expected, the Unless variation does not show up - this is by design, since it shows personalized content to people, not search engines.

We can be short about this. Bing (or its little brother Yahoo) does not show dynamic content in its search engine results pages.

Yandex is doing quite well in crawling and indexing javascript text. However, it fails top recognize meta elements like page title and description if you set this from a script. As expected, it does not show personalized Unless content.

Baidu does not seem to recognize any content that was injected with javascript.

Back to Unless home

View Source