Search code examples
iframeframesetframeset-iframe

Best Practices...Which should be used - iframes or ajax


I am just beginning my career as a web developer. I have noticed alot of writings about iframes, and they seem pretty neat (pardon the venacular). However...

My instructors always frown on the use of frames. Is there a difference between frames/frameset and iframes? Should they be so negative in their views? Should I ignore iframes (as they suggest) and start learning ajax?

I am concerened about best practices moving forward.


Solution

  • Framesets are totally different than iFrames. Framesets break up a 'page' with a collection of items that contain content completely separate from one another. This destroys the ability to really bookmark anything other than the frameset itself unless you 'view frame content'. (These, quite frankly, are still around for purposes of historic preservation)

    IFrames are simply a supported wrapper that lives within any html page that contains information from another page...whether it be a local or absolute reference. So, if you wanted to put the front page of 'http://theonion.com' inside of a div wrapper on some random page...you could...

    As far as best practices go, I really can't imagine much reason to use either. If you really want to show content from elsewhere these days, you can get it in many different ways.

    In terms of iframes & ajax...well...as you move forward in your career...try not to refer to them in the same sentence as having anything to do with one another.

    =2 cents...