javascript:history.go(-1);
was used in the older browser.IE6. For other browser compatibility try
window.history.go(-1);
where -1 represent the number of pages you want to go back (-1,-2...etc) and
return false
is required to prevent default event.
For example :
<a href="#" onclick="window.history.go(-1); return false;"> Link </a>