开发者

Will Google index my shtml page's content if it is printed by Javascript?

I have SHTML files which I'd like to implement the following:

  • Step 1: Let's say I have a SHTML page which displays "You must have Javascript turned on to view this content" by default / in a <noscript> tag.

The exact implementation of the next step doesn't really matter.

  • Step 2: Then on page load, the JS requests a PHP script returns either:

    • 1 / 0 (in plain text) and depending on the result the JS either prints the intended content or a captcha form.

      OR

    • the intended content or a captcha form, and the JS prints it.

The main thing to take from this is that the content is printed by JavaScript. Will Google still index the pages just as before (including the content)? Will I need to add anymore code/directives? Will Google index just as often, etc.?

NOTE: Content will always be printed f开发者_Python百科or Google. (No Captcha)


No. The Google bot does not support Javascript.

See http://www.google.com/support/webmasters/bin/answer.py?answer=35769#2 :

Use a text browser such as Lynx to examine your site, because most search engine spiders see your site much as Lynx would. If fancy features such as JavaScript, cookies, session IDs, frames, DHTML, or Flash keep you from seeing all of your site in a text browser, then search engine spiders may have trouble crawling your site.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜