Jump to content

IFRAME -- What are all the uses?


davej

Recommended Posts

Is there a list of good uses for iframes (visible or invisible)? I don't have much familiarity with them or their usefulness.

 

1. File uploads without page reload. The hidden iframe is redirected to the form action rather than the actual page.

Link to comment
Share on other sites

To include content across domains, and to provide a sandbox for included content.

 

A working example from something I am doing right now at my job is implementing live and video on demand players for all the major networks for our MVPD client. Essentially, someone can embed a link to a player .html file on their page in an iframe, and get video to show play.

 

This is how someone would use this "embed-api" as I like to fancy calling it

 

<iframe src="http://<client-domain>/path/to/players/embed-api/"></iframe>

 

There is no chance my code and libraries will conflict with the parent page, and it's an easy way to share this kind of API, since it serves ready to go HTML/CSS/Javascript.

Link to comment
Share on other sites

Iframes can be used to manage sessions with HTTPS while the rest of the page is served through HTTP. They have been used frequently for AJAX file uploads. They're used for WYSIWYG editors like the one I'm using right now to write this post.

Link to comment
Share on other sites

I would be interested to hear about this iframe session management scheme. I have been thinking in that direction just so I could get to the https local storage.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...