Need iframe substitute...

9 replies
Hello,

I'm using iframes to display sitewide content boxes. Is there any other way to display "hottest news" or "popular topics" sitewide in a box?

The iframe that I am using is slowling the site down dreadfully.

But at this time I cannot find any other simple way to display content sitewide. It's important to be able to modify a single file that propagates across pages...
#iframe #substitute
  • Profile picture of the author Brandon Tanner
    If the content is on your own site, the most efficient way to do that is to use PHP includes...

    PHP Tutorial - Include File
    Signature

    {{ DiscussionBoard.errors[7480758].message }}
    • Profile picture of the author rhinocl
      If it is a WordPress site there are a couple of plugins that will allow you to display 'teaser content' , or do you need to display all of the content?
      {{ DiscussionBoard.errors[7480849].message }}
  • Profile picture of the author FirstSocialApps
    Brandon is correct that a PHP include is best if it is your content. CURL perhaps if it is not your content (provided it is not interactive content) however I dont see how the IFRAME would slow your site down, even if the IFRAME is slow I would still expect the rest of the site would load quickly unless there is something wrong with the rest of the site.
    {{ DiscussionBoard.errors[7481399].message }}
  • Profile picture of the author Rideem3
    You could use Ajax.
    .load() – jQuery API
    {{ DiscussionBoard.errors[7481963].message }}
  • Profile picture of the author shipwrecked
    Don't know any AJAX... but a it of PHP, though I would have to transform all my pages into PHP? Of course, under some conditions I can load PHP scripts on HTML pages.

    I have some PHP knowledge, but I'm not a coder, so I'm looking for as simple a solution as possible.
    I usually rely on html, css.

    Iframe seemed so simple to use. I have all static .htm pages.

    I need indeed "teaser content" displaying boxes that update across pages by the modification of a single "feeder" file... like my iframe. It has an external .htm source (which is another .htm page that's not indexable by Google). I am pulling the results from that iframe.htm file.

    But the iframe needs to load another file's content to display. And this creates a drag... slow-mo loading...

    I would like to display "latest news/articles", "hottest products", "top 10 something" etc. in 3-4 such boxes. Even 1-2 might suffice.

    Simple, fast-loading alternatives are needed.

    The web is full with such "boxes"... They all load very fast.
    {{ DiscussionBoard.errors[7482952].message }}
    • Profile picture of the author Brandon Tanner
      I agree with FSA, in that if the pages are loading slow, it's not the iframe that's the problem. It might be the content inside the iframe that's the problem, but not the iframe itself.

      There are a lot of different possible reasons why a webpage might load slowly. It's usually pretty easy to pinpoint the cause/s though by using Firebug (if you click on the 'Net' tab and then reload the page, it will show you exactly how long it takes to load each element on your page). If nothing sticks out like a sore thumb in Firebug, then you may just be on a slow server (quite common with shared hosting plans).

      That said, I still think it's better to use PHP includes rather than iframes for what you want to do. And no need to change all your pages to PHP if you do this.
      Signature

      {{ DiscussionBoard.errors[7483616].message }}
  • Profile picture of the author shipwrecked
    OK, so the iframe is just a small part adding to the slow load problem. The iframe itself loads find, but I would like something else for displaying content boxes.

    I am looking for something similar, better than an iframe.

    Someone here mentioned the PHP "include" function... Is there anything simpler? I'm not a coding professional, so I'd be happy to use something as simple as possible...
    {{ DiscussionBoard.errors[7486687].message }}
    • Profile picture of the author Brandon Tanner
      Originally Posted by shipwrecked View Post

      Someone here mentioned the PHP "include" function... Is there anything simpler?
      Simpler than this?

      <?php include('yourfile.php'); ?>

      Good grief... are we feeling a bit lazy this morning?
      Signature

      {{ DiscussionBoard.errors[7487574].message }}
      • Profile picture of the author shipwrecked
        Originally Posted by Brandon Tanner View Post

        Simpler than this?

        <?php include('yourfile.php'); ?>

        Good grief... are we feeling a bit lazy this morning?
        Ha ha, nothing like that. Just that getting to PHP from the HTML will mean I am adding another type of script. Won't this be slower?

        I will have to work a bit on creating a small "window/box" and aligning it the right way in a DIV, in which the PHP include script would load from an external file.
        {{ DiscussionBoard.errors[7491725].message }}

Trending Topics