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
-
Brushing up on my SEO skills - how do I check my website to see if Javascript is blocking search engines from crawling the links within a javascript-enabled drop down menu?
I set my user agent in my Chrome browser to Googlebot and I disable javascript within my Chrome settings, but then what?
Technical SEO | | MagnitudeSEO0 -
My Google Author Pic Disappeared
My Google author picture, which had been in place for a couple of years, disappeared from all SERP results recently. I checked, and rel=author attribution is valid on every post, as is the link to to the Google + authorship page (which contains a link back to the web site). When I test URL's in the structured data testing tool the picture appears. I'm out of troubleshooting ideas. Any suggestions welcome.
Technical SEO | | waynekolenchuk0 -
Huge ranking difference between google and bing
I am trying to rank for the keyword "trash bags" I did a lot of on-page optimization and link building. We started ranking #2 on bing and yahoo but google seems to be stubbornly fluctuating between being as high as 20 and as low as 45 and even dropped our rankings for a couple of weeks. Is there any need for concern if google is acting so different from bing/yahoo?
Technical SEO | | EcomLkwd0 -
Google ranking downgraded
On Sept 29th our website 'keyword' rankings who totally destroy. We were always #1 to #2 for these keywords 1. listing presentation
Technical SEO | | RandyRoussie
2. real estate presentation Our website is: http://www.agentpresentations.com We asked Google through Webmaster Tools to reconsider the site and they replied back saying nothing was wrong. We run Google Adwords and we contacted them and they looked at the keywords and sent screenshots to us showing the ranking we still there. But they are not... as proven in Webmaster tools. So Adwords told us to ask Webmaster Tools to reconsider the site again. Nothing yet... What do you suggest?0 -
Google Knowledge Graph related question
I have a client who is facing age discrimination in the film industry. (Big surprise there.) The problem is, when you type in his name, Google's new Knowledge Graph displays a brief bio about him to the right of the search results. This bio snippet includes his year of birth. Wikipedia is credited as the source for the bio information about him, and yet, his Wikipedia entry doesn't include his age or birth date. Neither does his iMDb bio. So the question is, How can he figure out where Google is getting that birthdate from? He wants to try and remove it, not falsify it. Thanks for any help you can offer.
Technical SEO | | JamesAMartin0 -
Google Analtyics Changes?
Did anyone else's google analtyics numbers jump up this month? Our unique visitors increased some, but our pageviews tripled and our bounces dropped significantly. We have been working to optimize the sites and did have a huge drop in errors in our campaign reports.
Technical SEO | | Stevej240 -
Hiding text with Javascript and a more button
I am considering putting a block of text on may pages, that initially appears as a snippet with a 'show more' button that expands to show the whole lot. Question: If the search engines can see the whole lot, but the visitor only sees the snippet until they click 'show more' then is this cloaking? Is it a really bad idea? Or can I get away with it because I am not being deceptive just improving the design? Help!
Technical SEO | | mascotmike0 -
Google penalty
Anyone have any success stories on what they did to get out of Google penalty?
Technical SEO | | phatride0