Onclick = "history.back () does not work in Safari and IE

this simple line of code:

<a href="#" value="Go back!" onclick="history.back()" class="nav-li" >Back</a> 

works well for Chrome and Firefox, but not for Safari and IE ..., for IE this is a common case, only very strange people use it, but why Safari?

Note: the whole project is done using django 1.45

+5
source share
1 answer

it must be history.go(-1) , otherwise it will not work.

+8
source

Source: https://habr.com/ru/post/1274027/


All Articles