IFrame not working in Safari

自古美人都是妖i 提交于 2019-12-29 08:49:10

问题


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)

This is my code:

<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>

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.

Any ideas?


回答1:


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.

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.

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?




回答2:


the third party cookies are not working in safari.but in asp.net you can achieve this by using the cookieless sessions.

for more information refer this link http://msdn.microsoft.com/en-us/library/aa479314.aspx



来源:https://stackoverflow.com/questions/14105611/iframe-not-working-in-safari

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!