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
Hey everybody, We recently migrated our .co.uk to .com/en. Google for some reason is saying that the .com/en version has no hfrelang tags - even though they are clearly there and have had the same implementation as other language versions of the website. We also did a previous migration 6 months ago for the german version of our website and no hreflang problems there. We add our hreflang tags to our sitemap - which you can find here:
Technical SEO | | mooj
https://camaloon.com/en/web-sitemap.xml Any help or suggestions would be greatly appreciated!! Thanks 🙏0 -
Google Ecommerce Alerts
I recently started getting email notifications from Google re: new products on our websites. I am subscribed to Google alerts. Can anyone shed some light on this?
Technical SEO | | AMHC0 -
When will all of Google Maps be the same again?
As many of you are aware that the pigeon update was only applied to the new Google maps resulting in very different search results for Google local business. When you search for a business on old Google maps then you get totally different results vs the new Google maps. Some businesses totally disappeared completely from the search results. I have done my research and found out that it's because the new Algo was only applied to the new maps. Also new algo does not apply to other countries. Well the reason I posted this topic is because I have noticed that all the new Google Business listings I am verifying for my clients are all being put under the old Google maps and not the new ones. They come up fine when searching from old maps but not the new ones. I understand Google has not rolled out the pigeon on all data centers but why? Will Google eventually roll out the update to old maps? Since Google is adding businesses to old google maps then what's the point of even adding new listings?
Technical SEO | | bajaseo0 -
Google Fetch and Render - does this fix penalties?
Ran the fetch and render and came up with two "issues". My specific question is how likely would a link to quantcast (which blocks acces via roberts.txt) really hurt us if fetch and render shows it preventing rendering - which it is not. Thoughts and comments are much appreciated.
Technical SEO | | robertdonnell0 -
Google Schema Code for Organisation
I've created the Google Schema code for an organisation. Should this go in the template HTML so it would be shown on all pages or just on the home page?
Technical SEO | | CharlBritton0 -
Google Rejects Merchant Feed
Buon Giorno fromn 1 degrees C nearly dark & icy wetherby Uk... WTF Googles merchant centre has rejected my feed and In the time honoured zero customer service Ive grown accustomed to getting from Santa Clara County ive got bugger all idea how to fix it. Here is the feed:
Technical SEO | | Nightwing
http://ramsdensforcash.co.uk/sitefiles/handlers/googlemerchantdatafeed.ashx And here is the violation from the Google Gods themselves: http://ramsdensforcash.co.uk/sitefiles/handlers/googlemerchantdatafeed.ashx Anyone got any ideas why Google has given me the middle finger? Greazie tanto,
David0 -
Getting Listed on Google Satellite Maps
How does a website get listed in the satellite version of Google Maps? I have clients that are ranking number 1 in the pack 7 with Google Places and local SEO but they don't show up on the big map. Click on this link to see what I mean http://connect7.biz/google-maps.jpg I have circled the listings in red. How are these businesses getting listed in the satellite version of Google Maps? Thanks
Technical SEO | | fun52dig
Gary0 -
Google indexing page with description
Hello, We rank fairly high for a lot of terms but Google is not indexing our descriptions properly. An example is with "arnold schwarzenegger net worth". http://www.google.ca/search?q=arnold+schwarzenegger+net+worth&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a When we add content, we throw up a placeholder page first. The content gets added with no body content and the page only contains the net worth amount of the celebrity. We then go back through and re-add the descriptions and profile bio shortly after. Will that affect how the pages are getting indexed and is there a way we can get Google to go back to the page and try to index the description so it doesn't just appear as a straight link? Thanks, Alex
Technical SEO | | Anti-Alex0