In a project I'm trying to fetch data within the <body>
tag. So I can't echo anything in the <title>
'cause I haven't fetched anything yet. I want to change the title tag after the page has been loaded with jQuery.
Will crawlers understand this and when they index the page will they use the title I have provided with jQuery?
-
See this: http://stackoverflow.com/questions/9980824/can-googlebot-do-basic-javascript – Marco Johannesen Apr 24 '12 at 10:46
-
See this possible duplicate [Does Google's crawlers have Javascript? What if I load a page through AJAX?](http://stackoverflow.com/questions/2061844/does-googles-crawlers-have-javascript-what-if-i-load-a-page-through-ajax) – hakre Apr 24 '12 at 20:01
4 Answers
No, crawlers are highly unlikely to execute any of the javascript on the page. Some may inspect any javascript and make some assumptions based on that. But one should not assume that this is the case.

- 41,274
- 9
- 83
- 114
nope.. search engine crawlers see what is rendered by the server..
But if you are building an AJax website you can read the google provided Making AJAX Applications Crawlable
quoting the guide
If you're running an AJAX application with content that you'd like to appear in search results, we have a new process that, when implemented, can help Google (and potentially other search engines) crawl and index your content.

- 191,379
- 34
- 261
- 317
Google's spider can run JavaScript on pages that it processes, but I don't think there's any advice anywhere on what it can and can't do. Of course other crawlers won't be as sophisticated and will probably ignore dynamic content.

- 3,525
- 2
- 34
- 50
It's an interesting test actually. I'll try this one of one of my sites and post back. I know googlebot does understand some javascript, but I think this is more for dark SEO tactics; i.e. $('.spammystuff').hide(); type things.

- 455
- 1
- 5
- 15