How JavaScript Can Drive Users and Search Engines Away
How JavaScript Can Affect Search Engine Rankings
JavaScript is commonly used in drop-down and slide-out menu systems. These types of menus are referred to as JavaScript menus. The problem with using JavaScript menus is that most search engines cannot read or follow the links to other pages. The only two search engines that can currently read some minimal amount of JavaScript are Google and Yahoo. While this means that they may be able to read and identify some fully-formed links in JavaScript code, they cannot execute JavaScript code, and thus links that are dynamically formed or executed through though JavaScript cannot be followed. Search engine spiders are designed to follow standard HTML image or text hyperlinks. Period. They simply cannot follow most JavaScript links. If a search engine cannot find the pages in a site, those pages will never show up in search engine databases or search results pages.
Solution: Eliminate the use of JavaScript menus and upgrade your site to use CSS menus. CSS menus can duplicate almost anything you can do with JavaScript menus. Furthermore, because they use fully fomed hyperlinks and HTML lists, they are 100% compatible with search engines and modern browsers. You may experience a some problems with older browsers and there are some differnces with the way that CSS is utilized with Internet Explorer and FireFox, so make sure that you test thoroughly.
If you are really stuck on using a JavaScript menu system, there is a workaround for the JavaScript problem. Simply duplicate the links in a JavaScript menu as text hyperlinks in the footer on all the pages in the site. Spiders easily follow these links. Make sure that the site is designed so that the links lead to each major area of the site, and each page that they lead to contains hyperlinks to the most important pages in that section.
Search engines are also known to penalize web sites that use JavaScript redirects. JavaScript redirect are sometimes used to redirect a user to a new page when a page file name is changed or the page is moved. Never use a JavaScript redirect for this purpose. In July of 2004, Google learned how to read JavaScript for the first time and banned (eliminated all of their pages from Google) several thousand clients of a particular Las Vegas SEO company. The SEO company was using JavaScript to "cloak" the content on Web pages, which means that they were serving different content to users than that which the search engines see. Google’s first act when learning how to read JavaScript was to use it to detect Black Hat SEO techniques and penalize sites that use these deceptive techniques. Since then, any site that uses JavaScript redirects is at risk of being penalized by Google.
How JavaScript Can Affect Usability
I’ve seen several sites that looked very creative and included some very interesting features. The sites were designed using DHTML, which combines the use of HTML, JavaScript and CSS. The problem was that the site’s functionality required that JavaScript be enabled in the user’s browsers. Here is a very important rule for Web site design: Never design a site whose functionality depends upon a feature or plug-in being enabled in a user’s browser. The fact is that you have no control over which browser a visitor is using, nor do you have any control over the features they have enabled. An astonishing number of users intentionally or unintentionally disable JavaScript in their browsers.
According to the W3 Schools Browser Stastics page, up to 10% of all Web users may have disabled JavaScript. While this number may seem unusually high, it probably is realistic based upon further research. First, there are numerous articles on the Web that advise users to disable JavaScript to prevent site owners from stealing their e-mail addresses and other
personal information from their hard drives. These articles are mostly based upon nonsense, but they may be driving many users to disable JavaScript. While JavaScript can be used in rare situations to capture information entered on a Web page, standard JavaScript simply cannot read information directly from a hard drive. Plus, personal information, such as e-mail addresses, home addresses and credit card information are not normally stored in a browser. JavaScript can be used to read cookies, but only a very foolish or reckless Web site owner would store unencrypted personal information in a cookie (look up cross-site scripting).
The second reason is due to the use of Microsoft’s Internet Explorer. Internet Explorer offers a user the ability to set the Internet access security level to high. Setting the security level to high disables Active Scripting, which means all client-side active code, such as JavaScript, JScript and VBScript. Indeed, this is probably the main reason as to why 10% of all Web users have JavaScript disabled.
Microsoft has also added to the number of users who set the security level to high. Due to the constant assault on Internet Explorer, Microsoft has issued an advisory that encourages users to set the security level to high. The security advisory was released to address user’s concerns prior to their release of a fix for a particular security flaw found in IE, but the release of the advisory nonetheless contributes to the number of users who unintentionally disable
JavaScript.
What About Using Ajax?
Ajax is a fairly new blend of programming languages that incudes the use of JavaScript. Ajax can add some very interesting interactive features to a web page. However, because it uses JavaScript to accomplish these tasks, it is disabled when JavaScript is disabled. If you use Ajax on your web site, make sure the web site fnctions properly with JavaScript disabled.
What does all of this mean for the use of JavaScript on a Web site?
Users with JavaScript disabled do not need to present a problem for site owners if they remember the rule for Web site design: Never design a site whose functionality depends upon a feature or plug-in being enabled in a user’s browser. This means that you should always test a site that uses JavaScript to see how well it functions with JavaScript disabled.





