An Experiment with Google and JavaScript

An Experiment with Google and JavaScript

Here at Techdept we like the websites we develop to have a rich user experience and be developed in a clean and consistent way.

An important factor for the majority of the websites we develop is ensuring, given the right promotion, they are able to rank highly in search engines. Unfortunately, creating a rich JavaScript website involves additional work to make it perform well for Search Engine Optimization (SEO).

Objective

I want to prove that Google does not currently crawl JavaScript generated pages. I would also like to be the first to know when they do.

Method

I am going to create a simple webpage which uses JavaScript to put the message, “When will Google crawl JavaScript?” out. This page will then be submitted to Google and a daily task will be scheduled that searches Google and informs me as soon as any results are found.

The following technologies will be used:

Conclusion

The finished code can be found here:
https://github.com/chrisfoster78/GoogleJavascriptExperiment

The finished website can be found at:
http://googlejavascriptexperiment.azurewebsites.net/

As expected Google has not indexed the message injected with AJAX.

This could be extended to include Bing and Yahoo.  It would also be better if the status of each search engine was recorded and displayed.

Find this interesting?