I want to get redirect to the previous URL I was on.
I used this <meta http-equiv="refresh" content="2; url=javascript:history.back();">
but it doesnt work it gives me this error:
redirectrequireditems.html:14 Refused to refresh http://localhost/Test.com/redirectrequireditems.html to a javascript: URL
Line 14 is <meta http-equiv="refresh" content="2; url=javascript:history.back();">
Any suggestions?
Don't know if we can do it through META tag, I have the following solution using JavaScript:
<script language="JavaScript" type="text/javascript">
setTimeout("window.history.go(-1)",2000);
</script>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.