hello

I have a apache/php server. When I open the page from this server, I noticed my browser do not retain the input form data after I click on "back" then "forward" to the form page. This is annoying since I lost all input.

Also I find my apache response head contains a line:

Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0

is this a default setting? or from PHP, should I remove it?

Please share if you have same experience

Thanks

    we cant tell if thats generated by apache or php.

    but thats definately why your having the problem

    in the php script, try putting this at the VERY top of the script

    
    header('Cache-control: private', true);
    
    

    the 2nd paramter in the header call is a boolean for whether this header should replace other headers of the same type, in our case wehther it should replace the other cache-control header.

    you may want to take a look at this function
    apache_response_headers()

      Thanks rehfeld

      I'm checking it. I'll let you know the result

        Write a Reply...