There are however a number of scripts which, whilst not absolutely essential to the functioning of a site, are nevertheless very handy.
You may be surprised to learn that there is an alternative which keeps search engine spiders (reasonably) happy whilst drastically cutting down on the necessary scripts within any given web page.
Let’s take the humble “Add Bookmark” script as an example (please note that I have replaced the < > brackets with [ ] brackets so as to be able to display the code properly within this article).
var bookmarkurl = "http://www.doodademporium.com";
var bookmarktitle = "Purple Doodads for sale";
By placing the script’s function into an external folder and file (/java/bookmark.js for example) you will be able to streamline your code down to the following:
This method is also worth its weight in gold, so to speak, if you are running a number of scripts on the same page.
Just remember to create a different source file for each script, so as not to confuse matters unnecessarily.
Always remember that any web site should make a search engine’s life as easy as possible.
An accomplished copywriter, Sasch Mayer has been writing content for web and print for well over a decade.
He is currently living in the Republic of Cyprus and working under contract to IceGiant Web Design.