simple back button in drupal? I was using window.history.back() ,

&lt;a href="#" onclick="goBack()"&gt;Back&lt;/a&gt;


and

&lt;script&gt;
function goBack(){
  window.history.back();
}
&lt;/script&gt;


but it is not working in d7
Using jQuery we can

(function ($) {  
  // Go back
  $('a.back').click(function(){
     parent.history.back();
     return false;
  });
})(jQuery);


and add class="back" to your link

&lt;a href="#" class="back"&gt;Back&lt;/a&gt;