1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Iframes good or bad?

Discussion in 'HTML, Graphics & Programming' started by MattB, 11 Jan 2006.

  1. MattB

    Associate

    Joined: 20 Jul 2004

    Posts: 90

    Location: SUffolk UK

    I am in the process of developing a site, I am considering using iframes on the site is this a bad idea and if I do use them what will be the effect on the site?

    Cheers

    MattB
     
  2. Mr_L

    Mobster

    Joined: 28 Jan 2005

    Posts: 3,732

    Location: Worcester

    Well I know that the iframe tag has been dropped from XHTML strict so if you want to use it then you'd have to use a transitional doctype.

    Search engines don't particulaly like frames/iframes and there are other and much better ways of displaying content than these.

    How were you thinking of using the frames?
     
  3. MattB

    Associate

    Joined: 20 Jul 2004

    Posts: 90

    Location: SUffolk UK


    I was thinking of using iframe in some sort image gallery.
     
  4. Mr_L

    Mobster

    Joined: 28 Jan 2005

    Posts: 3,732

    Location: Worcester

    Be more straight forward to just have them in a normal page. You could always use a gallery system like SimpleGal, as long as your web space meets the requirements.
     
  5. Scam

    Capodecina

    Joined: 20 Oct 2002

    Posts: 13,740

    Location: London

    Depending on what you need it for, why not just use a div with a set height and width. Set overflow: auto in its CSS and jobs a good'un. The div will scroll when it needs to.
     
  6. robmiller

    Capodecina

    Joined: 26 Dec 2003

    Posts: 16,522

    Location: London

    Search engines, text based browsers and screen readers might have problems indexing your content, and it'll be difficult to bookmark and navigate for you readers - bookmarking will just take them to the start page (or the content of the frame, in which case it will be without navigation or anything else) and opening a link in a new window/tab will mean losing navigation as well.
     
  7. meghatronic

    Capodecina

    Joined: 24 Nov 2002

    Posts: 16,379

    Location: 38.744281°N 104.846806°W

    I used to love them, utterly love them...

    But as Scam said, divs are the daddy's now...

    Especially as you won't get W3C XHTML validation if you use iframes...
     
  8. thesubstitute

    Wise Guy

    Joined: 26 Jul 2004

    Posts: 1,073

    Location: Birmingham

    Sounds like you're talking about frames not iframes :o
     
  9. MattB

    Associate

    Joined: 20 Jul 2004

    Posts: 90

    Location: SUffolk UK

    Cheers for the help guys, the reason I need to use iframe was because I wanted to have a thumbnail gallery which when the thumbnail is clicked on displays a larger version of the picture on the page without having to reload the whole page again.
    What could be an alternative to using iframe to do this?
     
  10. robmiller

    Capodecina

    Joined: 26 Dec 2003

    Posts: 16,522

    Location: London

    ...which operate on exactly the same principle, except iframes are inline and frames use framesets. I'm not sure I follow :confused:
     
  11. robmiller

    Capodecina

    Joined: 26 Dec 2003

    Posts: 16,522

    Location: London

    You could use Javascript, with an HTML fall-back in case the user doesn't have it enabled :)
     
  12. Jotun

    Mobster

    Joined: 11 Jun 2005

    Posts: 3,606

    Location: Liverpool

    Can you not just open the link in a new window?
     
  13. MattB

    Associate

    Joined: 20 Jul 2004

    Posts: 90

    Location: SUffolk UK

    That sounds like it would be just what I need, any idea where I could find an example of this?

    Cheers

    MattB
     
  14. richard1973

    Gangster

    Joined: 22 Dec 2005

    Posts: 138

    I've been using Iframes for a few years, they are simple to set up and you get a lot of control on your layout design.

    Shame to hear WC3 XHTML are dropping it, I hope future IE releases will still support Iframes. My site uses them, I also use them for a gallery in my 3d and vr games section www.richard1973.co.uk (though site is down today, well it was earlier :( )
     
  15. richard1973

    Gangster

    Joined: 22 Dec 2005

    Posts: 138

    just like to add i've no problems with google finding my site which has Iframes used, it appears on first page UK and worldwide just by searching my name richard brown. I'm aware normal frames can cause problems though, but not sure to what degree of a problem.
     
  16. iCraig

    PermaBanned

    Joined: 21 Apr 2004

    Posts: 13,314

    Location: Wolverhampton

    They will still support iframes, but the simple fact is that iframes are oldhat.

    Far more effective ways of controlling your layouts.

    and even though Google will index iframed sites, Google will always index properly designed sites better (XHTML + CSS).