Web users are used to having a significant delay after clicking on a link before the targeted page loads in the browser. Due to high bandwidht and fast processors, these delays can sometimes be nearly imperceptible, leading to confusion on the part of the end user.
To preserve the cognitive affordance that the loading delay causes, the following simple javascript can be used.
var linkList = document.getElementsByTagName("a");
for (i = 0; i < linkList.length; i++) {
linkList[i].onclick = closeLinkFunction(linkList[i]);
}
function closeLinkFunction (linkNode){
return function (){
setTimeout('window.location = ' + "'" + linkNode.getAttribute('href') + "'", 1000);
return false;
}
}
For best results, make sure this script goes either at the bottom of the page or executed after page load.
Dated: 08/07/2006