-->

How do search engines crawl Javascript?

2019-08-06 03:52发布

问题:

If I add random keywords alt attrb to the images using jQuery document.ready (thinking that the page is already loaded), how does it affect search engines?

Will the search engines get the alt attrb that I added with any JavaScript at all? If not how come it can understand Ajax calls sent via JavaScript?

I want to add the alt attrb to images that don't have any in my client's site, in case they forget to put an alt text. jQuery will replace the empty ones with keywords. Is this possible?

回答1:

search bots can't read it , if you use JavaScript you need to use server-side language to add keyword to img alt



回答2:

The is some evidence that search engines execute some javascript, but assume they don't.

Do Google or other search engines execute JavaScript?

Do search engines process Javascript?

http://searchengineland.com/google-io-new-advances-in-the-searchability-of-javascript-and-flash-but-is-it-enough-19881



回答3:

until now, Google and other search engines still can not read the script created from a javascript you may need to use other scripts such as php