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
-
Google not detecting hreflang tags
Hey guys, Recently (approx 1 month ago) did a migration from the .co.uk version of our site to .com/en. We've been doing a migration every few months to get everything under our .com. Previous migrations haven't had any problems at all, and hreflang tags detected correctly. For this new UK migration (that was done 1 month ago) google is saying that it doesn't detect any hreflang tags. We place our hreflang tags in our sitemap and so far we haven't had any problems with it. Here's the sitemap: https://camaloon.com/en/web-sitemap.xml Any thoughts on what could be happening? I really appreciate your input and help 🙌
Technical SEO | | mooj0 -
Google + box on the right hand side
When you search on a company name in Google often the URL of the specific company is shown as 1st organic search result. Often one will also see a Google+ box on the right side when searching on a company name. This Google+ box includes a brand logo as well. Our company has also a Google+ account for several months. This page is also shown in the regular organic search results. But when I search on my specific company name, I don’t see the Google+ box on the right side of the results. However, when I search on my company name including my location, Google does show our Company information in Google Maps style, and that does include our last Google+ update as well. What do I need to do to show our Google+ information on the right side in the organic results when someone searches on our company name (without location), so our work and updates within Google+ are rewarded. Looking forward to hearing from you!
Technical SEO | | Onlinq0 -
Schema / microdata under Google listing
I was wondering if it was possible to add any schema, or microdata, or anything of that sort, to my website/webpage in order to show the location of the business just underneath the snippet of the website in Google. I have seen this with other businesses and I am not sure if it is only because they have the business listed on Google Places, or if it is because they have schema data on their website and when it is read by Google it shows underneath their snippet in Google search. Also, if there is an ability to make the address, phone, etc show up underneath the Google search listing, can I do this with a plugin or widget for wordpress? Thank you!
Technical SEO | | SEOWizards0 -
Titles in google serps incorrect
If you do the following query in google: site:orlandovisiting.com legend sparrow You'll see in the results the title appears as: legend-captain-jack-sparrow-1149.html Where the title tag in the source is: <title>The Legend of Captain Jack Sparrow Opens at Disney’s Hollywood Studiostitle> Eventually it normally rights itself, but does anyone else get this with their sites? Thanks.
Technical SEO | | walshy990 -
Does Google index has expiration?
Hi, I have this in mind and I think you can help me. Suppose that I have a pagin something like this: www.mysite.com/politics where I have a list of the current month news. Great, everytime the bot check this url, index the links that are there. What happens next month, all that link are not visible anymore by the user unless he search in a search box or google. Does google keep those links? The current month google check that those links are there, but next month are not, but they are alive. So, my question is, Does google keep this links for ever if they are alive but nowhere in the site (the bot not find them anymore but they work)? Thanks
Technical SEO | | informatica8100 -
Google.com
Hi We are managing a .com site for a client working on getting the site ranking. The site is hosted in the US. The content is rich, deep and unique. The site is in a competitive market but had begun ranking top 50 for a selection of keywords and we could see many more in the top 100. The site is now going backwards and only has a few keywords ranking top 50 and all the others have disappeared from the rankings all together. Any thought as to what could cause this. The site is managed from the Uk but as mentioned is hosted in the US. No penguin issues as all content unique, rich, relevant and fresh. SEO is also managed from the UK. Thoughts
Technical SEO | | SEOwins0 -
Pages not Indexed after a successful Google Fetch
I am trying to understand why google isn't indexing key content on my site. www.BeyondTransition.com is indexed and new pages show up in a couple of hours. My key content is 6 pages of information for each of 3000 events (driven by mySQL on a wordpress platform). These pages are reached via a search page, but no direct navigation from the home page. When I link to an event page from an indexed page it doesn't show up in search results. When I use fetch on webmaster tools the fetch is successful but is then not indexed - or if it does appear in results it's directed to the internal search page e.g. http://www.beyondtransition.com/site/races/course/race110003/ has been fetched and submitted with links but when I search for BeyondTransition Ironman Cozumel I get these results.... So what have I done wrong and how do I go about fixing it? All thoughts and advice appreciated Thanks Denis
Technical SEO | | beyondtransition0 -
Quality analytics without Google?
I'm trying to find a program or a site that will give me quality traffic data. If I'm going into a presentation or simply a round one meeting I like to prepare a 1 pager with info I've found. Without authentication access to their Google Analytics I feel like I'm a step behind. Any Help would be greatly appreciated. -JoeGrrrcia
Technical SEO | | JOEGRRRCIA0