Setting the HTTP request type of an <iframe>

2019-06-21 02:57发布

问题:

Is it possible to make an iframe use a POST rather than a GET request? I am not trying to post a form into the iframe but load the iframe depending on data generated on the server.

Unfortunately, I can't use Javascript in this case (because it is the company's policy that the checkout must be possible without JS).

回答1:

No. IFRAME SRC="/yourscript" always uses a GET.

(You could POST to the IFRAME, or you can GET a page inside the IFRAME that POSTs a form using JS; but you specifically said those aren't viable for you)



标签: html iframe