Ask any SEO professional and they will tell you JavaScript can be a double edged sword when it comes to website development, specifically in terms of design over SEO. Why? Well let’s take a look.
First things first, search engines don’t crawl JavaScript, so any keywords present within the script will be ignored, which is not good for SEO. You might think that this is not so important but actually one of the most important aspects of a website is the navigation and many websites utilise JavaScript for the menu or primary navigation. Many sites appear to use comments within JavaScript in an attempt to alleviate this problem; however the search engine robots will ignore any comments within script tags, so this will not help.
Another problem which arises with the use of JavaScript in website design is the search engines may see it as an attempt to mislead their bots because this has been a black hat method used by some poor SEO companies to display different information to bots than that which is displayed to the website visitors.
These issues are especially prevalent in navigational links where unscrupulous coders will hide redirects to different URL’s through JavaScript coding. This can actually result in search engines not indexing an entire section of your site as they ignore your top level navigation. Best practise would be to remove JavaScript from navigational links altogether and rely on HTML links instead.
If you’re website design does rely on drop down menus or other dynamic navigation then our advice would be to scrap it and adopt the use of CSS instead, you can get fantastic effects and probably the same appearance by using CSS.
Loading time is another issue affected by JavaScript. The overuse of JavaScript can slow down your website’s load time which not only affects the visitor experience, but also has an impact on your SEO. Load time is just one of many factors search engines use to rank your website.
How can JavaScript be used positively in Website Design?
JavaScript is best used to provide quick user interaction and help make the website more attractive to the end user, so using it to draw attention to call-to-action boxes, speeding up form submission and generally improving the visitor experience will help the website seem less static and more engaging for the user. This can be done without compromising the SEO by ensuring that the JavaScript is used on non-structural and navigational sections of the website.
So if you are going to use JavaScript, here are some tips to reduce the SEO negatives:
• Stick to HTML links where possible
• Do not use JavaScript for menus or indeed any primary navigational elements
• If using JavaScript with images or video make sure you use <alt> and <noscript> tags to offer a text alternative which is placed in the HTML markup
• Move your JavaScript to an external .JS file
• Place the actual script at the bottom of the page code i.e. just before the end body tag
If you are worried about making such changes to your website yourself then it’s probably time to call on the services of dedicated website developers. Designer Websites provide high quality search engine optimised websites for businesses. Contact us today to discuss your website needs.