Viewing 21 posts - 1 through 21 (of 21 total)
  • Iframes in HTML
  • molgrips
    Free Member

    Are they bad now?

    wwaswas
    Full Member

    yes.

    molgrips
    Free Member

    Why?

    wwaswas
    Full Member

    bad for SEO, navigation, useability. also havign a fixed thing on apage causes problems on mobile devices etc.

    are you tryign to include pages from external sites with your own wrapper on it or something?

    GrahamS
    Full Member

    AFAIK they are okay – certainly used extensively on sites I see anyway. They break the whole HTML=content CSS=style paradigm a bit, but that’s commonly broken anyway.

    trickydisco
    Free Member

    What are you trying to achieve?

    some presentation aspects of iframes can be done with divs and positioning

    phil.w
    Free Member

    Still supported in HTML 5. There are better ways of including dynamic content if that’s what you are trying to do.

    Hidden iframes are still common – even Google uses them.

    GrahamS
    Full Member

    bad for SEO, navigation, useability

    Aren’t you thinking of frames?

    havign a fixed thing on apage causes problems on mobile devices etc.

    I count 3 iframes on the STW forum page and it works fine on my phone.
    Why would they need to be “fixed on a page”? They are just blocks.

    wwaswas
    Full Member

    this is a cut’n’paste I’m afraid but does give the reasons why I prefer my developers to avoid them;

    They are not web standards compliant.
    They will cause massive issues for blind or inaccessible users, relying on screen-readers and keyboard navigation only.
    Content in the iFrame will be treated as a separate page by the search engines.
    iFrames don’t work in all browsers. – Therefore we need to make additional versions of the site to accommodate these users. ( Extra work, extra time and cost)
    Very bad practice for Search engine optimisation
    Complicates any ‘Print this page’ scripts.
    Users are not used to having multiple scrollbars. Also when using the mousewheel to scroll, browsers get confused as to whether you are scrolling the main page or the internal scrolling page inside the iFrame.
    iFrames promote the use of invalid HTML/XHTML. – Pages wont validate – meaning they are not W3C compliant and wont work on all modern browsers and screen readers ( accessibility)
    Very difficult to do bookmarking, printing and navigation
    iFrames slow down the website.
    Without scripting, they tend to break the “previous page” functionality offered by browsers. – ie you cannot use the ‘Back button’ on your browser.

    AlexSimon
    Full Member

    Seen as pretty bad, but then they’re still used by nearly everyone who has a facebook ‘like’ button or ‘Add this’ bar on their sites.

    I would say don’t use them for anything that is important content that belongs to your site. Then only use them if there’s no other way to achieve what you want.

    edit: I see there’s been a more thorough post above 🙂

    phil.w
    Free Member

    I count 3 iframes on the STW forum page

    I haven’t looked but at a guess that’s for the ads ?

    AlexSimon
    Full Member

    yes, on this page, the iframes are all for the ads

    GrahamS
    Full Member

    wwaswas: hmm some interesting points.

    They are not web standards compliant.. use of invalid HTML/XHTML. – Pages wont validate – meaning they are not W3C compliant

    How are they not valid HTML?

    They are in HTML4.01: http://www.w3.org/TR/1999/REC-html401-19991224/present/frames.html#h-16.5

    And in the HTML5 proposal: http://www.w3.org/TR/2011/WD-html5-20110525/the-iframe-element.html#the-iframe-element

    trickydisco
    Free Member

    They are not web standards compliant.

    wrong? How so? they validate?

    They will cause massive issues for blind or inaccessible usersrelying on screen-readers and keyboard navigation only

    again, wrong. In my experience screenreader users get on just fine as long as they are titled correctly

    iFrames don’t work in all browsers. – Therefore we need to make additional versions of the site to accommodate these users. ( Extra work, extra time and cost)

    hello 1999.. Which modern browser doesn’t support iframes?

    iFrames promote the use of invalid HTML/XHTML. – Pages wont validate – meaning they are not W3C compliant and wont work on all modern browsers and screen readers ( accessibility)

    No they don’t!..

    molgrips
    Free Member

    are you tryign to include pages from external sites with your own wrapper on it or something?

    The current page is static content with two levels of nested iframes. Pointless – perhaps, although I think the original author did it for layout reasons.

    However the bottom level (which is about 1/4 of the screen) is going to be replaced with dynamic content, by me, and the rest of the page tidied up.

    The top two levels can be merged, I’m fairly sure of that. But how best to include a dynamic section in a static page?

    It’s an application that gets rolled out to specific customers, so although it’s accessible via the public net, search engine visibility is not an issue.

    thebunk
    Full Member

    DIV and some ajax is how it’s done nowadays.

    I used to love iframes me.

    wwaswas
    Full Member

    trickydisco – I did say it was a cut’n’paste, I didn’t read it in detail – was just trying to make the point that iframes (whilst they may be syntactically allowed) are, by and large, being avoided by most developers ‘these days’.

    molgrips
    Free Member

    Ajax? Sod that.

    thebunk
    Full Member

    Everytime someone needlessly uses an iframe or make a tables based layout, someone else installs IE6.

    You’ve already done it in an iframe haven’t you?

    molgrips
    Free Member

    I’m editing someone else’s HTML and deciding whether or not to bin the existing iframes.

    andytherocketeer
    Full Member

    or make a tables based layout

    Jeez – don’t look at VBulletin generated HTML! That has more nested tables than an Ikea warehouse.

    I’ll only use iframes for things like importing a google calendar, map etc. where that’s the source the generate for embedding.

Viewing 21 posts - 1 through 21 (of 21 total)

The topic ‘Iframes in HTML’ is closed to new replies.