SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Enthusiast
    Join Date
    May 2007
    Posts
    56
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    iframes Good or bad

    Hi People

    hope everyone is good!!!

    I am working with a new client and he wants me to develop his site using iframes for the main foundation of the website but i have never used any kind of iframes in the past as I dont like it!!!

    SEO is bad, hard to use and broswer problems.

    I normally use include files in php which i thinks works really well!!

    so can you guys please please help me give him some good reason why NOT to use iframes or give reason why i should use iframes?????

    I done some research and it tells me NOT to use iframes but still not 100% sure.

    Also the site will be database driven and have a blog linked to it.

    Thanks in advance guys as the forum has always helped me in the past.

  2. #2
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    The answer is they were the spawn of some evil corporation, and somehow managed to get them into a Transitional HTML document. They are a complete accessibility nightmare. They have security concerns associated with them, people mistrust them and in general they have about zero credibility.

    If you can use PHP you should use that. Why faff about with idiotic iframes, which as you already know have several fatal flaws, navigation and usability issues, with the frames themselves, etc.

    Who is the coder you or the client? Yes you have to make some compromises but would you allow them to commit commercial suicide by using iframes just because they like the look of them?

    Also they would be a nightmare to manage and maintain or code for thus costing far too much time, money and resources.

  3. #3
    SitePoint Enthusiast
    Join Date
    May 2007
    Posts
    56
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hey this is what i am thinking thanks!!

    Your making me feel better already as I have a meeting tomorrow with my client and need to convince them not too use iframes. Also just to mention they want to use it for the menu driven content which i dont want to do!!

    If anyone has any more or even different thoughts on this matter please let me know as it would help me loads tommorow!!

    Thanks

  4. #4
    SitePoint Guru team1504's Avatar
    Join Date
    May 2010
    Location
    Okemos, Michigan, USA
    Posts
    732
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    hello skeej,
    im glad that you find the css forum helpful

    My recommendation would be not to use iFrames all by themself, but only in the case of a pop up box like the lightbox or for Apple fans fancybox or my favourite-- colourbox
    btw, these do involve javascript.
    So if you are someone who loathes js then this may not be the solution for you. However, it has been known to nice as it looks professional.

    Anywho, Im not there spokesperson and that is what i think.

    Best of luck in design and Regards,
    Team 1504

  5. #5
    SitePoint Wizard bronze trophy Black Max's Avatar
    Join Date
    Apr 2007
    Posts
    4,029
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    1504, I haven't seen Colorbox before. Nice link, thanks.

  6. #6
    SitePoint Guru team1504's Avatar
    Join Date
    May 2010
    Location
    Okemos, Michigan, USA
    Posts
    732
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Smile

    1504, I haven't seen Colorbox before. Nice link, thanks.
    oh no problem black max!

    I havent worked on this since october 2009, but you may be interested in some alterations i made to the colour box css here

    Regards,
    Team 1504

  7. #7
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,888
    Mentioned
    122 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by skeej View Post
    I am working with a new client and he wants me to develop his site using iframes for the main foundation of the website but i have never used any kind of iframes in the past as I dont like it!!!
    You most certainly should not be using iframes on any kind of "main foundation" on the site - there are accessibility and usability problems galore.

    If he intends to just have an <iframe> on the page that calls in an external document that then stays there, it is much better to do that with server-side includes or PHP.

    If he intends to have one single page with an <iframe>, loading successive pages of body content into that frame, he might as well shoot himself now If he wants to make it in all practical terms impossible for people to bookmark, link to or print pages from his website, he is going about it the right way. If he wants to make his website easy and rewarding for people to use, he needs to forget about iframes altogether.

    The only time when iframes can be useful (and even then, there are problems) is when you want to be able to swap content within one page, without the hassle or restrictiveness of relying on Javascript or Ajax - see example of where I've used them. It isn't ideal, but it is the simplest way to achieve what I wanted to achieve.

  8. #8
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,803
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Stevie D View Post
    The only time when iframes can be useful (and even then, there are problems) is when you want to be able to swap content within one page, without the hassle or restrictiveness of relying on Javascript or Ajax
    Of course the standards say you should use the <object> tag for that purpose but IE6 requires slightly different attributes from the other browsers meaning that you'd need two object tags. Once IE6 is dead the single object tag will be a simpler (and standard) alternative to the proprietary iframe (and embed) tags.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •