This code works fine in FF, it takes the user back to the previous page, but not in Chrome:
<a href="www.mypage.com" onclick="javascript:history.go(-1)"> Link </a>
What's the fix?
You should use window.history
and return a false so that the href
is not navigated by the browser ( the default behavior ).
<a href="www.mypage.com" onclick="window.history.go(-1); return false;"> Link </a>