IFrame 在 Safari 中不起作用 [英] IFrame not working in Safari

查看:108
本文介绍了IFrame 在 Safari 中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网页中有一个 iframe.它适用于 FF 和 Chrome,但不适用于 Safari(我使用的是 Safari 6.0)

I have an iframe in my web page. It works fine in FF and Chrome but not in Safari (I'm using Safari 6.0)

这是我的代码:

<html>  
    <head>  
        <title>Pengower</title>     
    </head>  
    <body>  
        <div id="container">  
            <iframe name="news" id="news"   
                src="http://www.penapplications.net/ImogenApps/?Pengower:CRM:Pengower_News">  
            </iframe>  
       </div><!--end container div-->  
    </body>  
</html>

有趣的是,如果我访问 src url 然后访问 iframe 页面,那么 iframe 会正确显示内容,但是如果我之前只访问 iframe 页面而不访问 src url 页面,它不会显示内容.

Funny thing is that, if I access the src url and then access the iframe page, then the iframe shows the content properly, but if I just access the iframe page without accessing the src url page before, it does not show the content.

有什么想法吗?

推荐答案

iframe 似乎正在重定向到 中介页面 (penDummyLogon.aspx) 尝试自动向 最终页面 (main.aspx) 并设置 cookie.

The iframe seems to be redirecting to a mediating page (penDummyLogon.aspx) which attempts to automatically submit a form to the final page (main.aspx) and set a cookie.

由于这种设置 cookie 的方法在最近的 Safari 版本中似乎已被阻止,因此用户在没有 cookie 的情况下到达了最终页面.main.aspx 似乎无法处理丢失的 cookie,因此无法加载其预期内容.

Since this method of setting a cookie seems to have been blocked in the recent Safari versions, the user arrives at the final page without the cookie. main.aspx doesn't seem to be able to handle the missing cookie, and as a result its expected content doesn't load.

有关此主题的更多信息,请参阅 在 Safari 的 iframe 中设置第三方 cookie 的技术是否仍然有效?Safari 3rd 方 cookie iframe 技巧不再有效?

For more about this subject see Does the technique for setting third-party cookies in iframes in Safari still work? and Safari 3rd party cookie iframe trick no longer working?

这篇关于IFrame 在 Safari 中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆