Reputation: 335
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?
Upvotes: 0
Views: 3337
Reputation: 36
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>
Upvotes: 2