Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have been using Alex Gorbatchev's Syntax Highlighter in my blog for the past couple of years. It serves the purpose, but it is a pain to add the code while blogging (I need to use a HTML Encoder and manually add this piece wrapped around a <pre> tag. But, the positive thing is, I know for sure the search engine will crawl the code I have written.

Recently I stumbled upon Github Gist and it was really easy to just copy paste, selected the language and embed in my website. However, the question I have here is, will the Search Engine crawl the code inside my gist making sure that it lands on my page?

share|improve this question

migrated from programmers.stackexchange.com Jul 24 '12 at 12:48

This question came from our site for professional programmers interested in conceptual questions about software development.

    
the title, yes, not contents –  Sathya Jul 24 '12 at 12:49

1 Answer 1

up vote 2 down vote accepted

From what I can see, gist.github.com uses javascript to embed gists such as:

<script src="https://gist.github.com/1234.js"> </script>

And although Google parses some javascript but I doubt 3rd party widgets would get parsed (see update below)

but this exact issue was discussed by Simon Bingham here. He suggests you use the "SEO Friendly Gists" tool which essentially grabs the embed code but ALSO generates a <noscript> version of the gist (that WILL be indexed by google)

Update:

Google Does some Javascript Parsing, and the only official resource I can find on this came from Best approach to have Google index content primarily generated by Javascript where they offer up:

https://developers.google.com/webmasters/ajax-crawling/

Which explains how to have ajax pages indexed.

I've haven't read anything about 3rd party widgets being parsed (nor have I seen any of them own my own sites get parsed) - I think google is focusing on building it's database not improving how your page renders.

If you find some official literature on this, please comment!

share|improve this answer
    
I thought Google did parse JavaScript. Check this article from 2011: googlewebmastercentral.blogspot.com/2011/11/… (furthermore, 2010: forbes.com/sites/velocity/2010/06/25/…) –  Alpha Jul 26 '12 at 23:39
    
I updated answer above –  electblake Jul 27 '12 at 0:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.