The iframe form is not submitted in IE, but works in Firefox.

I have a form that submits values ​​to a page in a wizard. When I load this form in an iframe, everything works fine in Firefox, this will lead me to the second step of the wizard and save the values ​​that I filled out. When I test this in Internet Explorer, I don’t get to the second step, instead it returns me to the first step of the wizard, while all the fields are empty. When I test this in Fiddler, I see that im gets a different response when I submit the form in an Iframe from Firefox compared to Internet Explorer. How can I make this work for all browsers? What am I doing wrong?

Here is what I will return from Fiddler:

Firefox

Message:

Ressult Protocol    Host    URL Body    Caching Content-Type    Process Comments    Custom  
1   302 HTTP    www.dmg.eu  /brugman/budgetplanner/aanmelden.php    0   no-store, no-cache, must-revalidate, post-check=0, pre-check=0  Expires: Thu, 19 Nov 1981 08:52:00 GMT  text/html; charset=UTF-8    firefox:6116    

Receive:

#   Result  Protocol    Host    URL Body    Caching Content-Type    Process Comments    Custom  
2   200 HTTP    www.dmg.eu  /brugman/budgetplanner/ 40.677  no-store, no-cache, must-revalidate, post-check=0, pre-check=0  Expires: Thu, 19 Nov 1981 08:52:00 GMT  text/html; charset=UTF-8    firefox:6116

Internet explorer

Message:

Result  Protocol    Host    URL Body    Caching Content-Type    Process Comments    Custom  
73  302 HTTP    www.dmg.eu  /brugman/budgetplanner/aanmelden.php    0   no-store, no-cache, must-revalidate, post-check=0, pre-check=0  Expires: Thu, 19 Nov 1981 08:52:00 GMT  text/html; charset=UTF-8    iexplore:536    

Get:

Result  Protocol    Host    URL Body    Caching Content-Type    Process Comments    Custom  
74  302 HTTP    www.dmg.eu  /brugman/budgetplanner/ 0   no-store, no-cache, must-revalidate, post-check=0, pre-check=0  Expires: Thu, 19 Nov 1981 08:52:00 GMT  text/html; charset=UTF-8    iexplore:536    

Hope someone knows what diff is.

EDIT: (more info .......)

html

<%@ CODEPAGE=65001 %>
<% Response.Charset = "utf-8" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<meta name="robots" content="index,follow,noodp" />

<title>Hey</title>

</head>

<body class="body">

<iframe width="800px" height="1024" src="http://www.dmg.eu/brugman/budgetplanner/aanmelden.php">
</iframe>

</body>

</html>
+3
3

, , / , , , .

Brugman/budgetplanner/aanmelden.php B/brugman/budgetplanner/.

, X FF :

Request: POST A 
Response: Redirect B (that the 302)

Request: GET B
Response: Result of B

IE :

Request: POST A
Response: Redirect B (that the 302)

Request: GET B
Response: Redirect Y (We see another 302)

, , B . , .

, :

  • / BODY 4 fiddler, ( , Raw View , ). X Y .
  • PHP-, B (/brugman/budgetplanner/)

IE FF , - ( - , ). , .

+1

:

http://viralpatel.net/blogs/2008/12/how-to-set-third-party-cookies-with-iframe.html

p3p http- ASP.Net?

HttpContext.Current.Response.AddHeader("p3p", "CP=\""IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\""")

p3p http- PHP?

header('P3P:CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"');

p3p http- JSP?

response.setHeader("P3P","CP='IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT'")

p3p http- ColdFusion?

<cfheader name="P3P" value="CP='IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT'" />

, .

+10

The problem was this:

I submitted the form, checked the message, and established a session. This session has not been established because in IE, when you want to use Session vars in an iFrame, you must set the header parameters.

This is the code used for this:

ADD IN THIS LINE IN ORDER TO SOLVE THE INTERNET EXPLORER ALWAYS GET NEW SESSION ISSUE
header('P3P: CP="CAO PSA OUR"');

This means that IE allows you to use sessions.

Additional information on: http://www.w3.org/P3P/

+1
source

Source: https://habr.com/ru/post/1737335/


All Articles