Results 1 to 3 of 3
  1. #1
    Nidhogg
    Join Date
    Jul 2006
    Posts
    3,999
    BG Level
    7

    Web Server/Coding Related Question

    I posted this in the random tech thread but, it didn't get any responses. I think it might be an issue that merits a thread as well as I'm not sure how simple or complicated the answer is.



    Which would take less bandwidth from a server. (not the individual although the individuals bandwidth would be nice to know as well)

    Scenario one:

    We have a php file that is iframed onto the main page. The php file on the main page displays only text characters and hyperlinks. In this scenario the php file is set with meta tags to refresh the php page every 3 minutes. Since the iframe is dependent on the php value, the iframe changes to reflect it and everyone is forced from 3 minutes of their entrance to reset that php page. Thus getting the new value on the php page

    Scenario 2

    We have a php file that is iframed onto the main page. The php file on the main page displays only text characters and hyperlinks. Rather than using metatags in the php file to refresh the page, on the main page is a script that only refreshes the iframe itself. The interval of refresh is the same. The value of the php file still changes just does not force a refresh of the php file, the script on the main page takes care of it by only refreshing the iframe. Downside to this is having a script on the main page

    I think the argument is scenario 1 = a page refresh vs scenario 2 =only an iframe refresh. I think anyway but I figured I ask, either way emulate the main page to refresh slightly. Scenario 1 causes a slight refresh with all elements in tact just the iframe recognizes the php file forced a refresh so it changes that value. The second scenario is causing a slight refresh because the script is forcing the iframe to refresh. Or is it that there is no difference between the methods?

  2. #2
    Puppetmaster
    Join Date
    Oct 2006
    Posts
    55
    BG Level
    2

    Scenario 1 is reloading the entire page and scenario 2 is only reloading the iframe and then refreshing the page. As far as bandwidth is concerned the second scenario would use less.

    Also, if you are looking for other alternatives more detail on what you are trying to do might help. I personally hate iframes and do all I can to avoid using them.

  3. #3
    Nidhogg
    Join Date
    Jul 2006
    Posts
    3,999
    BG Level
    7

    Thank you! I appreciate the response pretty much this is the main page www.insomniacgamers.net

    What I'm referring to is the "ticker portion" which displays the game name and the person streaming. Our current system is that we have an area on the website, protected by htaccess credentials, where they input this information. When the individuals input this information, it takes them to php file. This php file creates another php file under the same name. In the metatag of that php file that is created there is a 60 second interval refresh function. The main page pulls from this php file. Thus that php file forces a refresh of only that file every 60 seconds which in turn updates the iframe on the main page.

    So the page that the users are on isnt being reloaded, although that page is drawing information from another one, which forces a refresh.


    What I was planning to do was to include an additional script on the main page that calls for a refresh of only the iframe rather than the php page the information is being drawn from to constantly reset. Thus taking out the metatag of that php page. I just wanted to make sure I explained it correctly but yeah we're pretty much trying to have the ticker top left of the stream be updated.

    We're looking into using twitter for that currently but it doesn't update in real time so we may have to have a script to refresh it every 10 minutes or so as well.

Similar Threads

  1. Web Coding Question
    By SaviorSelf in forum Tech
    Replies: 12
    Last Post: 2011-04-17, 02:02
  2. Replies: 7
    Last Post: 2008-07-01, 15:21
  3. Replies: 4
    Last Post: 2008-04-16, 14:02
  4. noob coding question
    By Effrenat in forum Tech
    Replies: 9
    Last Post: 2007-02-06, 19:16