Ok so I have this code that allows me to redirect the users on my current page to any other page when they click the back button
The code works fine but now I would like to pass the URLs parameters from the previous page to the redirected page so for example. Lets us say that the main page the user is on is www.example.com/ready&val=1&base=2&timeid=3&rfid=4
I would like the &val=1&base=2&timeid=3&rfid=4 passed on to the end of the domain that the user is being redirected to when they click the back button
<script type="text/javascript">
!function(){
var c_link = "www.example.com/time";
var t;
try{
for(t=0;10>t;++t)history.pushState({},"","#");
onpopstate=function(t){t.state&&location.replace(c_link)}}
catch(o){}
}();
</script>
So the user gets to www.example.com/time I would like the &val=1&base=2&timeid=3&rfid=4
to be and the end of it.