gpt4 book ai didi

iframe - 通过 Http Get 将查询字符串参数传递到 IE 中的 iframe 的问题

转载 作者:行者123 更新时间:2023-12-02 05:55:36 25 4
gpt4 key购买 nike

这是对我之前问题的跟进:Problem passing parameters via Iframe in IE .从未解决过。


这是它的核心:

I'm trying to execute an HTTP GET from my website to another website that is brought in via iframe.

On Firefox, you can see in the source that the correct url is in the iframe src along with it's correct parameters-- and it works.

On IE, you can see in the source that the correct url is in the iframe src along with it's correct parameters-- and it doesn't work...

Is there something about IE that doesn't let you pass parameters through an iframe in the querystring?

I've tried refreshing the iframe in IE, I've tried refreshing my page & the iframe in IE, and I've tried copying the url and re-pasting it into the iframe src (forcing it to refresh as if I just entered it into the address bar for that iframe window). Still no luck!

Anyone know why this is happening, or have any suggestions to try to get around this?

As for the code, all it's doing is creating the src from the backend code on page load and setting the src attribute from the back end...

//Backend code to set src
mainIframe.Attributes["src"] = srcWeJustCreated;

//Front end iframe code
<iframe id="mainIframe" runat="server" />

我已经创建了一个临时帐户供您登录并了解我的意思。这样您就可以使用 firebug 或任何其他调试技术来弄清楚为什么这不起作用,而不是让我尝试解释发生了什么。

编辑:更改了帐户凭据。请改用这个
用户名:马特
密码:全局采购

请关注this link进入登录页面。使用上述凭据登录的人将带您到后端主页面。单击左侧显示“假期”的图片,您将看到一个带有 iframe 的页面,并从那里执行 Http Get。

如果您需要有关后台代码等方面的更多详细信息,请告诉我,我会发布它们。

谢谢,
马特

最佳答案

在使用 Fiddler2 完成 HTTP 请求后,比较不同的浏览器,我发现 IE 可以很好地发出请求,但无法在 iframe 中设置任何 cookie。

我还注意到,如果我单独打开那个带框架的页面,它确实有效。更重要的是,在此处再次注销后,iframed 版本也可以使用。那是因为它已经有了 session cookie,iframe 不再需要设置它。

事实证明,这是一个已知的安全限制:IE 会阻止 iframe 中的 cookie。但这可以通过使用 Platform for Privacy Preferences (P3P) 来克服。

这里有一些链接可以帮助您解决问题。从 StackOverflow 上的另一个(已回答)问题开始:

关于iframe - 通过 Http Get 将查询字符串参数传递到 IE 中的 iframe 的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1329613/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com