Facebook Page Tab Empty in Internet Explorer 8

I designed a Facebook page tab that doubles as a website style app:

http://www.facebook.com/pages/ECSid/246158322109906?sk=app_249322331789747

When you visit this app in Chrome, Firefox or Safari, the iframe is displayed just fine. However, in IE you see a blank page. If I remove all the content from the tab and replace it with some basic HTML that displays IE, and if I view the tab of the page regardless of Facebook, it will work fine.

When using IE8 developer tools, it seems that only half of the page tab is loaded, almost like it loads the head and abandons it. Javascript doesn’t have any errors when testing in Chrome, and I don't seem to see any errors in IE.

The only thing that appears in Chrome when testing is an error:

Unsafe JavaScript attempt to access frame with URL http://www.facebook.com/risetoremain from frame with URL... 

Any suggestions on how I can get this tab to display in IE?

+4
source share
4 answers

How your application works in iframe: facebook tab,
for internet explorer work correctly, you must set the P3P policy settings:

for php: <?php header("p3p: CP=\"ALL DSP COR PSAa PSDa OUR NOR ONL UNI COM NAV\"");?>

for asp.net (in global.asax):

 protected void Application_BeginRequest(Object sender, EventArgs e) { HttpContext.Current.Response.AddHeader("p3p", "CP=\"CAO PSA OUR\""); } 

otherwise in Internet Explorer you will not be able to access the cookie

after applying P3P , your response header is as follows:

 Response Headers Cache-Control no-cache Content-Type text/html; charset=utf-8 Server Microsoft-IIS/7.0 P3P CP="CAO PSA OUR" ... 
+1
source

I had the same problem, only for me the problem was that facebook was adding an extremely large negative margin to the html element of my page tab. So my content was there, it was just moved 3000 pixels. Adding an inline style to my html element worked for me.

 <html xmlns="http://www.w3.org/1999/xhtml" style="margin-left:0 !important;"> 
+1
source

I know this is a bit late, but we had the same problem, and I solved it by adding a document type in html. He solved it for IE7 and IE8.

0
source

I had the same problem, I just removed "console.log" from my code.

-3
source

Source: https://habr.com/ru/post/1383937/


All Articles