0

I had intended to use getJson() to return the data I wanted to loop through with .each() and use in html I was dynamically building, but then I read that spiders ignore Javascript/jQuery and only take HTML into account in their indexing of web sites.

I'm assuming (wrongly, I hope) that this means dynamically generated HTML is ignored. I want the textual content of the HTML indeed to be indexed, though.

SO, I am thinking about using $.load() instead and passing back fully formed HTML from separate files. The data is static (will only be updated when I update the site) so this is feasible, but it just seems amateurish (to pass back all that literal HTML when it could be generated dynamically client-side, using the passed-back json data inserted into it) - but, if being "amateurish" is helpful to my SEO, I'll do it.

What, if anything, am I misunderstanding or failing to consider?

khr055
  • 28,690
  • 16
  • 36
  • 48
B. Clay Shannon-B. Crow Raven
  • 8,547
  • 144
  • 472
  • 862

1 Answers1

3

Using $.load() will lead you to the same problems as dynamically generating the HTML. If the spider supports one, chances are it will support both. This discussion may provide some insight.

Can you include the static files using a server-side scripting language such as PHP or JSP? This would allow you to make edits and have them pulled in automatically while serving the HTML in a javascript-free manner.

Community
  • 1
  • 1
Jeremy Gallant
  • 764
  • 3
  • 12