Javascript SEO Tips

A few years back, if you wanted your site to have nice shiny moving objects on your page, or a shimmering button, your only choice was to pay a Flash developer a large chunk of money and then force your end users to download the Adobe player so they could see it. Every time you wanted to change the buttons you had to go back to your Flash developer and pay them another large chunk fo change. Thankfully, in the modern web you can acheive the vast majority of these functions using JavaScript – with fantastic libraries such as jQuery, YUI and MooTools (amongst many others) you can accomplish the same slick finished product using code which every computer can understand easily and which displays the same to everyone. Sounds perfect right? Unfortunately not. One of the big drawbacks with Flash is that search engines tend not to bother reading the contents of flash files, and when they do it is very rare that the contents get indexed. Whilst the contents of Javascript code CAN be seen by search engines, once again the contents tend not to be indexed. So whilst we advise using JavaScript in your site, we have written this simple selection of Javascript SEO Tips to hopefully help you along the way.

Elementary Javascript SEO Tips

As mentioned elsewhere, when Google first checks your site, it will only check the first n characters of your source code. Javascript is normally put inside the head area of your code, so have a large chunk of JS in this area may well prevent your actual content from being seen. So, first Javascript SEO Tip: All of your JavaScript should be externalised. This is a posh way of saying that it needs to be popped into a seperate file and called in as a single entity. So for example, in your source code you might have:

<script  type="text/javascript">

		function contactformscript() {
				jQuery('#contactConfirm').hide();
				jQuery.post('http://www.flosee.co.uk/wp-content/plugins/easy-speak-widget-contact-form/thanks.php', jQuery("#easyForm").serialize(),
				function(output){
				jQuery('#contactConfirm').html(output).fadeIn(1000);
			});
		}

		</script>

If you take everything that is written in between the <script> and </script> and cut it from the original document, then save it in a seperate file and call it external.js. Then amend your html to read:

<script type='text/javascript' src='external.js'></script>

As you can see, this is a much shorter snippet of code, and in any case the search engines will largely ignore it. As it is going to be ignored anyway, we have just moved your actual content closer to the top of the file and given it a higher chance of being found. Simple javascript SEO Tips such as this can have a big impact on your keyword rankings, and once done also mean that this code is centralised, so modifying it once will have an effect on your entire site. Compartmentalising your code in this way is good web design practise, and is also extremely effective for your long term SEO ambitions.

CSS & JavaScript SEO Tips

The other thing you can do is to utilise CSS for SEO, then apply Javascript SEO Tips to highlight these elements of your content to the end user. This allows the search engines to read content as plain text, but allows your end user to view your content in a way which is easily accessible to them. As an example, consider the code snippets above. To the search engines these are plain text, but to human visitors they are formatted in a way that makes them distinguishable from the main flow of content. This is accomplished using a combination of Javascript and CSS.

When we are completing SEO design for clients, we make frequent use of our own javascript seo tips, but if you are developing your own website then it is worth bearing in mind two simple nuggets of advice when it comes to JavaScript – externalise the script wherever possible, and combie it with CSS to acheive amazing visual impact whilst minimising the additional code which is presented to search engine robots.

If you would like any further advice relating to Javascript SEO Tips, then please dont hesitate to contact us and we will do all we can to help. If you have asked us to conduct your ongoing SEO campaign then we will take care of this side of things on your behalf, which we will also do if you have instructed is to complete your onsite SEO. If you still have questions then please feel free to comment below, and we will reply to help build a library of javascript seo tips for others to find in the future.

Search Engine Optimisation

SEO packages

We have a wide variety of SEO packages to suit your budget and ambition
All of our packages are designed to make your website more visible and increase profitability for your business.

Social Marketing

Social Marketing

Involving your customers in your business is a vital part of any online venture, and our specialist social media advisors can help move your brand into the online world with a bang.

Web Design

SEO Web Design

Whatever you want your website to say about you, we can help you make it visually stunning and effective at displaying your products and services, as well as being profitable and successful.

145 queries in 2.476 seconds.