Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.0k views
in Technique[技术] by (71.8m points)

html - IFrame not working in Safari

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...