Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: Iframes problem

  1. #1
    New to the CF scene
    Join Date
    Jan 2019
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Iframes problem

    Hi,

    I have a few iframes which load the content from the same domain (by refreshing every minute). They normally work fine but when the tab with the page is hidden and after some time I click back to activate the tab with the page (which contains the iframes) I get the following error grey screen inside the iframes:

    A network change was detected.

    When I reload the page – the iframes resume the refreshing every minute.

    I am using this line to refresh the pages inside the iframes:

    Code:
    <meta http-equiv="refresh" content="60">

    I also tried this and still the error shows:

    Code:
    <script>
    setTimeout(function(){
       window.location.reload(1);
    }, 5000);
    
    </script>

    I wonder how to force the iframes to refresh all the time?

    I uploaded the screenshot

    -network-png
    Last edited by vinyl-junkie; Jan 10th, 2019 at 03:15 PM. Reason: added code tags

  2. #2
    Master Coder sunfighter's Avatar
    Join Date
    Jan 2011
    Location
    Washington
    Posts
    7,910
    Thanks
    36
    Thanked 1,057 Times in 1,053 Posts
    The refresh rate may be the problem. You do know that hitting a site minute puts a burden on the sites host? One iframe doing this to my site would have you banned and you say you have several. Why do you need to keep doing this?
    Evolution - The non-random survival of random variants.
    Physics is actually atoms trying to understand themselves.

  3. #3
    Senior Coder deathshadow's Avatar
    Join Date
    Feb 2016
    Location
    Keene, NH
    Posts
    3,273
    Thanks
    4
    Thanked 476 Times in 464 Posts
    I'm with @sunfighter on this. What is being described if done on any of the VPS I'm hosting for people would have me kicking such things off the hosting for pulling such a bloated, painful, wasteful stunt.

    Particularly since frames? Really? What is this, 1997?

    What is it you're ACTUALLY trying to do with this? Is it something that might be better served via push technologies like websockets? Could it be more efficiently handled in a single request via AJAX instead of multiple frames?

    I mean, frames for what you describe really went the way of the dodo twenty years ago.
    “There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiencies.” – C.A.R. Hoare, The 1980 ACM Turing Award Lecture
    http://www.cutcodedown.com


 

Tags for this Thread

Posting Permissions

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