history.back(-1) code example
Example 1: js go back
history.back()
Example 2: history.back()
// --------------------if history.back() not working---------------------
//instead of this
<a href="javascript:history.back();">back</a>
//do this
<a href="javascript:history.go(-1);">back</a>