Raspberry Posted October 14, 2014 Share Posted October 14, 2014 (edited) Hi!Do you know a way to tell to the browser we don't want to include POST data while making an HTTP redirection?I don't need them and didn't want to see the "Do you want to resend data?" popup client-side.Or a way to change the displayed URL?The current code is : http_response_code(307);header('Location: '.$url); Edited October 14, 2014 by Raspberry Link to comment Share on other sites More sharing options...
justsomeguy Posted October 14, 2014 Share Posted October 14, 2014 All redirects are get requests only. There is not a way to tell the browser to redirect and also send post data, you can only tell it to send a get request. Link to comment Share on other sites More sharing options...
Raspberry Posted October 22, 2014 Author Share Posted October 22, 2014 I don't want to send POST data (nor GET data). ^^I want to tell to the browser to NOT ask to resend POST data previously submitted.To prevent the browser popup "You'll be redirected. Do you want to resend data ?" [yes] [no] Link to comment Share on other sites More sharing options...
justsomeguy Posted October 22, 2014 Share Posted October 22, 2014 So, you redirect. After you process the post data you send a location header to redirect to another page. That will cause the browser to send a get request. If they refresh, it will send another get request, not a post request. Link to comment Share on other sites More sharing options...
Raspberry Posted November 25, 2014 Author Share Posted November 25, 2014 Finally found how to do that. http_response_code(303); // See Other 308 is "We don't do this anymore, go ask there from now"307 is "We can't do this currently, go ask there for now"303 is "We did it, now please go there for the next part" Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now