Does Google Read Javascript?
-
I would like to include a list of links in a select type box which I would like google to follow. In order to do this, I will be styling it with the help of javascript, and in turn change the select box into a ul and the options into li's. The li's would each contain a link, but if javascript is disabled it will fallback to a normal css styled select box.
My question is would google follow the links made by the javascript? Or would the bot just recognize the select box as a select box and not links.
Thanks for any help!
-
Some additional notes...
Traditionally, Google hasn't followed javascript, but they are getting much better at using it for link discovery.
Just a few weeks ago Matt Cutts made a video in which he recommended making your javascript more readable:
http://www.youtube.com/watch?feature=player_embedded&v=8yTn_HLDaJs
And some evidence in the wild about Google becoming more script friendly:
http://www.webpronews.com/is-googlebot-getting-more-human-like-2012-05
That said, it's still by far better for SEO purposes to ensure that your links are HTML based. Although Google may still discover javascript links, it's unknown what link attributes like anchor text and PageRank pass through them. Best practices, for now, still say to use regular HTML links.
-
Matt says that Google can read some javascript...
Danny Sullivan speculates that they will be able to see those links:
http://searchengineland.com/google-can-now-execute-ajax-javascript-for-indexing-99518
But in my opinion, if you want your links to be seen without a doubt, don't put them in java.
-
I would assume you're talking about using a JS method to create links in the DOM. The answer here is no, Googlebot will not recognize them. Google has improved their ability to read some JS (like if you use an embedded JS link Googlebot can understand that) but it does not interpret or execute JS that I know of.
If you go this route, I would suggest enumerating your links in a noscript block.
-
Google doesn't follow javascript so if you want the links followed on that page you'll need to somehow include them in your code.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Why are Google SERP Sitelinks "Not Working?"
Hi, I'm hoping someone can provide some insight. I Google searched "citizenpath" recently and found that all of our our sitelinks have identical text. The text seems to come from the site footer. It isn't using the meta descriptions (we definitely have) or even a Google-dictated snippet from the page. I understand we don't have "control" of this. It's also worth mentioning that if you search a specific page like "contact us citizenpath" you'll get a more appropriate excerpt. Can you help us understand what is happening? This isn't helpful for Google users or CitizenPath. Did the Google algorithm go awry or is there a technical error on our site? We use up-to-date versions of Wordpress and Yoast SEO. Thanks! search.png
Technical SEO | | 123Russ0 -
Why google does not remove my page?
Hi everyone, last week i add "Noindex" tag into my page, but that site still appear in the organic search. what other things i can do for remove from google?
Technical SEO | | Jorge_HDI0 -
Google Search Console - Sitemap
Hi all, Quick question. I'm trying to update my sitemap via Google Search Console using a sitemap.xml file that I've created with ScreamingFrog. However, when trying to submit it, it seems that Google only allows sitemaps that are located at a path within your domain (i.e. www.example.com/sitemap.xml) as opposed to being able to directly upload a sitemap.xml file.Is there any way that I can easily upload my sitemap.xml file? Or is there any easy way that I can upload the file to a path on my domain so I can upload via the URL?Any insight would be much appreciated!Best,Sung
Technical SEO | | hdeg0 -
Why did Google stop indexing my site?
Google used to crawl my site every few minutes. Suddenly it stopped and the last week it indexed 3 pages out of thousands. https://www.google.co.il/#q=site:www.yetzira.com&source=lnt&tbs=qdr:w&sa=X&ei=I9aTUfTTCaKN0wX5moCgAw&ved=0CBgQpwUoAw&bav=on.2,or.r_cp.r_qf.&fp=cfac44f10e55f418&biw=1829&bih=938 What could cause this to happen and how can I solve this problem? Thanks!
Technical SEO | | JillB20130 -
About google Disavow tool
My website is attacked by spammed link method, so should i use Goolge disavow tool to remove that links? And i have an question that when i use google Disavow to remove backlinks, but i still not remove it on the webpage that placed my links. Does Google index that backlink again? or never?
Technical SEO | | magician0 -
De-indexed from Google
Hi Search Experts! We are just launching a new site for a client with a completely new URL. The client can not provide any access details for their existing site. Any ideas how can we get the existing site de-indexed from Google? Thanks guys!
Technical SEO | | rikmon0 -
Google Indexed Only 1 Page
Hi, I'm new and hope this forum can help me. I have recently resubmit my sitemap and Google only Indexed 1 Page. I can still see many of my old indexed pages in the SERP's? I have upgraded my template and graded all my pages to A's on SEOmoz, I have solid backlinks and have been building them over time. I have redirected all my 404 errors in .htaccess and removed /index.php from my url's. I have never done this before but my website runs perfect and all my pages redirect as I hoped. My site: www.FunerallCoverFinder.co.za How do I figure out what the problem is? Thanks in Advance!
Technical SEO | | Klement690 -
Google Quality Algorithm Update
I'm curious what correlations or impacting variables SEO professionals have found that have increased or decreased ranking with the most recent algorithm change. It appears that many innocent sites have fallen victim, especially larger sites. It also appears that Google is maintaining that specific sites were not targeted... Meaning there must be proven characteristics.
Technical SEO | | douglaskarr0