For years website creators were told that JavaScript was something we didn’t really want to use. This is because it is harder to download for consumers, and it made it more difficult for the search engine crawlers to get through a site. In this way it could affect the rankings one would get for their site. Still, there were reasons to use JavaScript over other codes. For most website developers HTML text was the best choice to ensure their site would be seen by consumers. Now things are changing.
Google announced at the I/O Developers conference that they can crawl JavaScript code and extract URLs. So any URL with JavaScript links or code can now be crawled. When creating JavaScript links an onclick() format is used. It is this code that tells the browser what page to open. There are still some things to consider when using JavaScript. First if the code is in a separate file Google searchbots cannot read it. So you do have to make sure that you combine the files.
The other thing to consider is the consumers. In the past the consumer may not have had a computer that could download the code or internet that supports it. This is still the case for some. While many of us have at least Windows XP there are still those with Windows 98. One has to realise if they use JavaScript they may be limiting the consumers who can download the pages. There is also an issue with the speed of download. Most internet users do want to have quicker download ability, and JavaScript can still be slow.
Search engine optimisation techniques may now allow for JavaScript to be crawled, but that does not change other issues. While it can be crawled the search bots are still going to consider the speed in which your site downloads. If the speed is very low you will find that indexing is lower than you would like. If you don’t get the traffic you need because consumers cannot handle JavaScript you are going to see lower indexing results.
The point is you may still want to avoid JavaScript because of these other issues. Now, if you use JavaScript and Google crawls your pages you know that the bots will not get lost in the pages, thus you are getting in the index. The important thing is that you create the JavaScript correctly.