Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do Google or other search engines execute JavaScript?

I am just wondering if Google or other search engines execute JavaScript on your web page. For example, if you set the title tag using JavaScript, does the Google search engine see that?

like image 206
Tod Avatar asked Mar 19 '11 21:03

Tod


People also ask

Do search engines execute JavaScript?

Making your JavaScript-powered web applications discoverable via Google Search can help you find new users and re-engage existing users as they search for the content your web app provides. While Google Search runs JavaScript with an evergreen version of Chromium, there are a few things that you can optimize.

Is Google built on JavaScript?

Seriously, it's everywhere. Google's search results that spring up as your typing get there with JavaScript. The Gmail web client is powered by JavaScript.

Can search engines crawl JavaScript?

While Google are generally able to crawl and index most JavaScript content, they still advise using server-side rendering or pre-rendering, rather than relying on a client-side approach as its 'difficult to process JavaScript, and not all search engine crawlers are able to process it successfully or immediately'.

Why is JavaScript used by Google?

JavaScript becomes relevant for SEO when it's being used to dynamically load or modify critical content. Ideally, Googlebot should be able to see all content on a page, including the parts that are being dynamically added using JavaScript.


1 Answers

There have been some experiments performed for SEO purposes which indicate that at least the big players (Google, for example) can and do follow some simple JavaScript. They avoid sneaky redirects and such, but some basic content manipulation does seem to get through. (I don't have a link handy for Google themselves confirming or denying this, it's just various posts I've come across when dealing with this before.)

However, this is generally considered unreliable. If SEO is being done for any important purpose, don't rely on the spiders indexing much dynamic content.

There's actually a very good (in my opinion, anyway) answer here to a very similar question. What I like about that answer is how it breaks down the steps for generating good, indexable, and best of all maintainable web pages with concerns properly separated. Adhering as much as possible to this process generally results in good SEO, good accessibility, and good design skills in general.

like image 69
David Avatar answered Sep 23 '22 18:09

David