title: iframe content doesn't always load
body: <p>So I have a system that essentially enabled communication between two computers, and uses a WebRTC framework to achieve this:</p>
  
  <p>"The Host": This is the control computer, and clients connect to this. They control the clients window.
  "The Client": The is the user on the other end. They are having their window controlled by the server.</p>
  
  <p>What I mean by control, is that the host can:</p>
  
  <ul>
  <li>change CSS on the clients open window.</li>
  <li>control the URL of an iframe on the clients open window</li>
  </ul>
  
  <p>There are variations on these but essentially thats the amount of control there is.</p>
  
  <p>When "the client" logs in, the host sends a web address to the client. This web address will then be displayed in an iframe, as such:</p>
  
  <pre><code>$('#iframe_id').attr("src", URL);
  </code></pre>
  
  <p>there is also the ability to send a new web address to the client, in the form of a message. The same code is used above in order to navigate to that URL.</p>
  
  <p>The problem I am having is that on, roughly 1 in 4 computers the iframe doesn't actually load. It either displays a white screen, or it shows the little "page could not be displayed" icon:</p>
  
  <ul>
  <li>I have been unable to reliably duplicate this bug</li>
  <li>I have not seen a clear pattern between computers that can and cannot view the iframe content.</li>
  </ul>
  
  <p>All clients are running google chrome, most on an apple powermac. The only semi-link I have made is that windows computers seem slightly more susceptible to it, but not in a way I can reproduce. Sometimes refreshing the page works...</p>
  
  <p>Are there any known bugs that could possibly cause this to happen? I have read about iframe white flashes but I am confident it isn't that issue. I am confident it isn't a problem with jQuery loading because that produces issues before this and would be easy to spot.</p>
  
  <p>Thanks so much.
  Alex</p>
  
  <p>edit: Ok so here is the code that is collecting data from the server. Upon inspection the data being received is correct.</p>
  
  <pre><code>conn.on('data', function(data) {
      var data_array = JSON.parse(data);
      console.log(data_array);
  
      // initialisation
      if(data_array.type=='init' &amp;&amp; inititated === false) {
          if(data_array.duration  &gt; 0) {
              set_timeleft(data_array.duration);                  // how long is the exam? (minutes)      
          } else {
              $('#connection_remainingtime').html('No limits');
          }
          $('#content_frame').attr("src", data_array.uri);    // url to navigate to
          //timestarted = data_array.start.replace(/ /g,'');  // start time
          ob = data_array.ob;                                 // is it open book? Doesnt do anything really... why use it if it isnt open book?
          snd = data_array.snd;                               // is sound allowed?
          inititated = true;
      }       
  }
  </code></pre>
  
  <p>It is definitele trying to make the iframe navigate somewhere as when the client launches the iframe changes - its trying to load something but failing.</p>
  
  <p><strong>EDIT: Update on this issue:</strong> It does actually work, just not with google forms. And again it isn't everybody's computers, it is only a few people. If they navigate elsewhere (<a href="http://www.bit-tech.net" rel="nofollow">http://www.bit-tech.net</a> for example) then it works just fine.</p>
  
  <p>** FURTHER UPDATE **: It seems on the ones that fail, there is an 'X-Frames-Origin' issue, in that its set the 'SAMEORIGIN'. I dont understand why some students would get this problem and some wouldn't... surely it depends upon the page you are navigating to, and if one person can get it all should be able to?</p>