none
IE 8 frame issue: This content cannot be displayed in a frame

    Question

  • Hello All,

    I have a .net website which works fine in IE6.

    After moving to IE8, it displays me the error:  This content cannot be displayed in a frame.   To help protect the security of information you enter into this website, the publisher of this content does not allow it to be displayed in a frame.

    Actually, the page contains a hyperlink to a uploaded doc or website.Clicking the hyperlink opens the doc or website in a new pop-up(iframe).

     

    Kindly help

     

    Thanks!

     

    Friday, November 18, 2011 10:28 AM

Answers

  • Hi Deepika,

    As the message tells us, this page is not allowed to be opened in an iframe, here you may wonder who don't allow this to be performed. The answer is, the web site owners. This is by design, there is no solution or workaround.

    Please check out the official statement:
    "Clickjacking Defense: Some hackers try to trick users into clicking buttons that appear to perform safe or harmless functions, but instead perform unrelated tasks. Clickjackers embed malicious code or "redress" the user interface by using transparent frames that overlay specific UI elements with misleading text and images. To help prevent clickjacking, Web site owners can send an HTTP response header named X-Frame-Options with HTML pages to restrict how the page may be framed.
    X-Frame-Options: Deny
    
    If the X-Frame-Options value contains the token Deny, Internet Explorer 8 prevents the page from rendering if it is contained within a frame. If the value contains the token SameOrigin, Internet Explorer will not render the page if the top level-browsing-context differs from the origin of the page containing the directive. Blocked pages are replaced with a "This content cannot be displayed in a frame" error page."
    From this library: http://msdn.microsoft.com/en-us/library/cc288472(v=vs.85).aspx.

    Have a nice day,
    Leo Liu [MSFT]
    MSDN Community Support | Feedback to us
    Tuesday, November 22, 2011 3:06 AM
    Moderator

All replies

  • Hi Deepika,

    Could you show some relatively complete code snippet for us to reproduce your issue?
    Thanks.

    Have a nice day,
    Leo Liu [MSFT]
    MSDN Community Support | Feedback to us
    Monday, November 21, 2011 4:49 AM
    Moderator
  • Hello Liu,

    The issue is that , currently I am using IE 6 and the site works fine.

    It is basically viewing the uploaded doc or website link in a new pop-up.

    On moving to IE 8, it gives the below error.

    This content cannot be displayed in a frame.   To help protect the security of information you enter into this website, the publisher of this content does not allow it to be displayed in a frame.

     

    HOWEVER Clicking -open this content in a new window displays the frame.

    The code used is     <iframe id="ifDetails" name="iFDetails" height="100%" frameborder="0" scrolling="auto" src="http://www.google.com">

    Thanks and  Regards

    Monday, November 21, 2011 12:39 PM
  • Hi Deepika,

    As the message tells us, this page is not allowed to be opened in an iframe, here you may wonder who don't allow this to be performed. The answer is, the web site owners. This is by design, there is no solution or workaround.

    Please check out the official statement:
    "Clickjacking Defense: Some hackers try to trick users into clicking buttons that appear to perform safe or harmless functions, but instead perform unrelated tasks. Clickjackers embed malicious code or "redress" the user interface by using transparent frames that overlay specific UI elements with misleading text and images. To help prevent clickjacking, Web site owners can send an HTTP response header named X-Frame-Options with HTML pages to restrict how the page may be framed.
    X-Frame-Options: Deny
    
    If the X-Frame-Options value contains the token Deny, Internet Explorer 8 prevents the page from rendering if it is contained within a frame. If the value contains the token SameOrigin, Internet Explorer will not render the page if the top level-browsing-context differs from the origin of the page containing the directive. Blocked pages are replaced with a "This content cannot be displayed in a frame" error page."
    From this library: http://msdn.microsoft.com/en-us/library/cc288472(v=vs.85).aspx.

    Have a nice day,
    Leo Liu [MSFT]
    MSDN Community Support | Feedback to us
    Tuesday, November 22, 2011 3:06 AM
    Moderator
  • Hello Leo,

     

    Thanks for that note, however had already explored setting the x-frame-options to SAMEORIGIN.

    Also, just came across one more observation, that this behaviour is ONLY for a few websites.

    E.g. http://www.google.com

    and not the other websites(http://msdn.microsoft.com/en-us/library/ms754130.aspx , http://www.yahoo.com , etc.)

    They open perfectly in the iframe, hence it is not an issue for the new IE8 'clickjacking' feature. 

     Kindly provide inputs if any, as to why is the behaviour specific to google.

    Thanks and Regards

    Thursday, November 24, 2011 7:45 AM
  • As the message tells us, this page is not allowed to be opened in an iframe, here you may wonder who don't allow this to be performed. The answer is, the web site owners. This is by design, there is no solution or workaround.

    Please check out this in my prior post, the X-Frame-Options option is controld by the web site owners. They make the decision of whether to allow one page to be opened in an iframe or not.
    Leo Liu [MSFT]
    MSDN Community Support | Feedback to us
    Thursday, November 24, 2011 8:09 AM
    Moderator
  •  The solution is simple - instead of displaying www.Nitakuwepo.com, simply delete the www part and your left with Nitakuwepo.com only. That will work as embed in your website. Look at my African Kiswahili page called Notakuwepo under Kenya Tourism Online  site . The You tube link i have do not contain  www.
    Tuesday, December 13, 2011 1:57 PM
  • Sorry, but I call Bullshirt.

    There is no frame. There is only a blank (virgin) tab that has never been used.

    BUT, it works in a "new window", not a "new tab". This is utter BS that only appeared with ie8.


    Consume. Conform. Obey.

    Wednesday, February 15, 2012 4:08 AM
  • This helped, thanks.
    Wednesday, February 29, 2012 12:39 PM
  • Hello,

    I was receiving a similar issue on a page with youtube video embeds.  In my case, the problem was quite simply caused by line-breaks where they oughtn't have been (caused by copy-pasting the code from a text file that was word-wrapping).

    If you have your iframe split over several lines, try removing the line breaks.

    In the case of youtube embeds, this works without issue:

    <iframe width="420" height="315" src="http://www.youtube.com/embed/BlahBlahBlah" frameborder="0" allowfullscreen></iframe>

    While this causes the same error as you are receiving:

    <iframe width="420" height="315"

    src="http://www.youtube.com/embed/

    BlahBlahBlah" frameborder="0"

    allowfullscreen></iframe>

    As you can see in the above example, the src is broken over two lines, which I believe is the root of the problem.  This would explain why the problem is sometimes resolved by deleting the 'WWW' portion of the url, as that shortens the url, possibly allowing it to all fit on a single line, and so you unknowingly fix the issue. 

    Anyways, to anyone still getting this problem: I recommend that you try fitting everything in your iframe on one line.

    Best of luck,

    Sam


    • Edited by Sam_F Thursday, March 29, 2012 4:33 PM typo
    Thursday, March 29, 2012 4:33 PM
  • Hello, I am a newbie and am not sure if I am even in the right place but I was directed to this link from a google search. I am running Windows XP Home Edition 2002 Service Pack 3. I have an error/warning window that is stuck on my desktop. No matter what I change the wallpaper to, this window remains rooted on my screen to the far right. It has a red circle with an X on the left side and I can only read half of the error statement: "                                "This content cannot be..."

    below that it says: "To help protect the security..."

                                   "into this website, the publis..."

                                   "not allow it to be displayed..."

                                   "what you can try:"

    and then when I :  "Open this content in a n..."

    hover this line is

    underlined like a link

    After reading about clickjacking above, I am afraid to click on this. 

    Any suggestions?


    Sunday, April 07, 2013 11:18 PM