Reputation: 3293
I just noticed that some of webpages can not be viewable through frames. I have to display this website (https://mebbis.meb.gov.tr/login1.aspx) but I just don't know where to start . In addition to this, I tried couple of more websites like google, facebook, yahoo, etc... But non of them seem to be displayable through iframes either. I am not really interested in google yahoo facebook. However I have to get this website working. Does anyone out there know a workaround to fix this? Thank you
<iframe runat="server" id="mainFrame" name="main" width="100%" src="https://mebbis.meb.gov.tr/login1.aspx" style="height: 600px;">Your browser doesn't support frames.</iframe>
P.s. I am working with asp.net so any suggestion with that will be appreciated.
Why I need this : I designed a website that can take pictures of a frame so that our users can login to mebbis.gov.tr to prove that they are currently students so that they can ride the buses with reduced price. We'v been working this over a month and we are quite stuck at this point.
Upvotes: 2
Views: 850
Reputation: 17101
I have seen this recently myself within e-learning courseware, as courseware is typically loaded within an iframe.
Some websites add a setting so that they cannot be visable within an iframe. The setting is a header called "x-frame-options"
An example of this is facebook, which passes back:
x-frame-options DENY
This can be viewed in firebug under the net panel.
More details about the header are here:
https://developer.mozilla.org/en/The_X-FRAME-OPTIONS_response_header
I've noticed that the link you sent doesn't have the header. Because the website is actually returning an error, it looks like it's detecting that you are loading it though an iframe in the onload javascript event and redirecting you to an error page.
if (self != top) self.location='http://mebbis.meb.gov.tr/hatali.jpg'
If a website is specifically trying to stop loading through an iframe, you probably shouldn't do so.
Upvotes: 2