开发者

About Redirect as POST

开发者 https://www.devze.com 2023-04-07 20:45 出处:网络
I want to redirect the user to some url in other website, bu开发者_JS百科t to send with his redirect some post variable.. is this possible? And if yes, how?

I want to redirect the user to some url in other website, bu开发者_JS百科t to send with his redirect some post variable.. is this possible? And if yes, how?

Thanks.


It is not. :(

You can however submit an hidden form using Javascript.

EDIT: shame upon me. It seems it can be achieved w/o Javascript. Try to post some data to a PHP page you write yourself, which basically tells the browser to do a 303 See Other redirect. It shall work, in the sense that the browser should re-POST the data on the redirection target, but someone reports this causes the browser to show a "really repost the data?" message, like the one you see if you refresh a web page you loaded with a POST.

However, even if it works, I think nobody does it.

0

精彩评论

暂无评论...
验证码 换一张
取 消