Question

I have three pages:

Step1.php -> step2.php -> step3.php

As it shows, after submitting the step1.php it will go to step2.php

In step2.php there is JavaScript on the bottom, and it will automatically redirect to step3.php after 2 seconds.

<input type="hidden" name="queryString" id="queryString" value="<?php echo $_SERVER['QUERY_STRING'] ?>"/>
<script type="text/javascript">

    function redirection() {
        var queryString =document.getElementById("queryString").value;
        var reloadURL = "step3.php?"+queryString;
        location.href = reloadURL;
    }

        setTimeout("redirection()", 2000);
</script>

This forward flow is working in every other browser.

Now I am just clicking the back button of the browser from `step3.php page. Then it comes to step2.php and after 2 seconds it will go to step3.php.

But in Safari it doesn't work, it will get stuck on step2.php.

Any ideas?

Was it helpful?

Solution

Webkit browser are caching the last state of the last pages, as it was, when you left. Have you tried to use a meta tag instead. Don't know if this works, but worth a try:

<meta http-equiv="refresh" content="2;url=page2.php">

OTHER TIPS

try this link it might be usefull http://www.php.net/manual/en/reserved.variables.get.php as mostly problem lies in passing variable to addressbar from java script

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top