Connect to secure websites inside html frame/iframe - html

I am trying to set up a dashboard for my IT group to view several different servers in one web page.
I have 4 frames set up, and tested them with cnn or apple.com to make sure everything was set up.
<!DOCTYPE html>
<html>
...
<frameset cols="40%,60%" rows="50%,50%">
<frame src="http://www.apple.com">
<frame src="http://www.cnn.com">
<frame src="http://www.espn.com">
<frame src="http://10.2.0.252/">
</frameset>
</html>
So, when loading "http://10.2.0.252", it redirects to the login page (https://10.2.0.252) but opens the full page and does not keep it within the frame. The only thing on the page now is the login. The actual link for this is "https://" but when I put this in the code, the page is blank.
Is it possible to get the authentication page to stay inside the frame? I want to create frames that can be interactive so we can log in to the servers to view all of the status'.
EDIT: I am trying to display the https link in an iframe, but it just displays a blank screen. Does anyone know why <iframe src="https://10.2.0.252" width="100%" height="600"></iframe> will not at least bring up the login? It does not showing anything at the moment.

I think you'll need to rethink your system.
If the site has a framekiller on it, you're wasting time trying to override it. There may be an API you can use - check with the sites to see if they offer one.

Related

why a frame opens at new tab alone without menu

when i work at the same tab, everything is fine, but when i ctrl+click one of the link from left site, it will be opened at the new tab alone without "menu.html". i mean i don't want the pages without menu side at the new tab.
is there any way to do that?
here is index html:
<frameset cols="20%,*" frameborder="1">
<frame name="menu" src="menu.html" noresize="noresize" />
<frame name="main" src="main.html" noresize="noresize" />
here is menu.html (left side):
<table>
<tr><td>Link 1</td></tr>
<tr><td>Link 2</td></tr></table>
You can consider HTML frames as a separate browser window i.e. Frames divides the browser window into multiple windows. Thus, when you open a link from a frame into new tab (Ctrl+Click), the new tab will display the html page from the link which is not having frameset.
To achieve the behavior you have mentioned in your question, you need to use frameset in all your web pages. This can be achieved using Master Page in ASP .NET.

Basic iframe Not Loading One Webpage

I am trying to load an iframe for an ESPN fantasy league into a website I made for our league members. I can load pretty much any page I want except for this one, which is a link right to our league.
<iframe src="https://games.espn.go.com/flb/leagueoffice?leagueId=27520&seasonId=2015" name="grforum" scrolling="auto" frameborder="no" align="center" height = "100%" width = "100%">
Any idea what could be causing this or how I would be able to get it to load? Thank you very much.
If you open up your JavaScript console, you'll see that the web page (ESPN) does not permit cross-origin framing - i.e. they don't allow you to load that within an iframe on your website.
Load denied by X-Frame-Options: http://games.espn.go.com/flb/leagueoffice?leagueId=27520&seasonId=2015 does not permit cross-origin framing.

HTML load two urls in two frames in one page

it is simple enough as an idea but i never tried it and attempted with the following code:
<html>
<frameset cols="30%,70%">
<frame src="www.google.com" name="frame1">
<frame src="www.yahoo.com" name="frame2">
</frameset>
</html>
example what am trying to load is google.com and yahoo.com in one page in two different frames. Any idea how?
Thanks,
use iframes!
<iframe src="url" alt="circa1990browser" />
<iframe src="url2" alt="circa1990browser" />
but i agree with the poster below. what you posted is technically correct and should work, as far as i know...
HTML5 has depreciated the use of frameset and frame tags.
Browsers like Google Chrome (which are widely used) are switching completely to HTML5.
Hence, using frameset and frame tags for public apps would be dangerous.
About the question:
The pages you are trying to load i.e. Yahoo and Google do not allow that by their X-frame-options.
So, it is virtually impossible now.
Thats its its will work for you....is there any error in that ? Accorcing to me this will work fine.
Check this W3C site for more details : Frames
Quite an old question, but I believe I have the answer for you.
I believe google and yahoo have some sort of JavaScript running on their pages that detects whether they are being loaded in a frame, and if so, do not display any content.
In other words, your code is technically valid, but Yahoo and Google are explicitly preventing this action.
See this JSfiddle example. The Yahoo and Google frames do not work, but the Craigslist one does.
(Note that I used iframes rather than a frameset, but the end result will be the same.)

Can't show some websites in iframe tag

I am trying to develop a page in which I can show more than 3 website at a time,
as below:
<ul>
<li>
<iframe src="http://www.facebook.com/" /><p> iframe is not supported</p>
</li>
<li>
<iframe src="http://www.yahoo.com/"></iframe>
</li>
<li>
<iframe src="http://www.google.co.in"></iframe>
</li>
</ul>
The problem is that it shows yahoo.com and google.co.in, but does not display Facebook in the iframe.
You have to check for HTTP response header X-Frame-Option of those sites. if its value is "DENY or SAMEORIGIN", then you can not load those website in the iframes.
DENY = No one can load the website in iframe. Even the same domain page wont be able to load.
SAMEORIGIN = only a page which is in same domain can load this website in iframe.
Since some websites have decided to disable embedding them in iframes theres nothing you can do with pure html solutions. You could create a serverside script (in PHP) that pulls the target site via your webserver and then use the html etc.
The only way I can think of that would enable you to check wether the site has loaded is to search the iframe for a specific element that exists on the target website (for example a div with a specific id or class on the Facebook's front page). The reason would be that different websites can handle being embedded into iframes differently and while some might display some content, some may display nothing etc and the only way to be sure is to check for real elements.
facebook does not want you to load their main site in frames
<iframe src="http://m.facebook.com/" width="200" height="300" scrolling="auto" frameborder=0></iframe>
width="200" height="300" can be adjusted accordingly.*
What this does is load the mobile version of facebook in the frame instead of the main site.
Reference
You can use the object tag:
<object data = "https://facebook.com"></object>
You will not able to do that, you can only iframe like button... someother not whole site.

How could I hide the url of a site within an iframe?

I have a site that has an iframe linking to another site with the following example iframe code:
<html>
<body>
<iframe src="http://google.com" width="100%" height="600">
</iframe>
</body>
</html>
So, for the above example, how could I prevent visitors from finding the url: http://google.com ?
You can't. Suffice to browse the source code and see it. And even if you try to put this in an obfuscated javascript file which will dynamically set the src property of the iframe nothing can't be hidden from the Net tab in FireBug. So I would recommend you not wasting your time with this.
You can write e.g. PHP or Apache rewrite to fetch the page from backend server. This has very little CPU overhead.
You could nest an iframe in another site / page and point the iframe on your current page to that one.
This would obfuscate it to some degree but if someone is intent on finding the URL, chances are they will.