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 experienced copywriter with well over a decade of authoring experience, Sasch Mayer currently lives in Larnaca, Cyprus where he writes under contract to IceGiant Web Design Services.