0

I create an iframe with content, the page is displayed without an error. When I refresh the iframe (after 3 seconds), I get an 404. I've tried different approaches like adding a metadata refresh tag, plain JS, jquery,... A 'working' example can be found here; https://jsfiddle.net/RaZoR_BlaZe/ezswtxk7/32/

<div class="second-row">
  <iframe name="presentatie" id="presframe" scrolling="no" frameborder="0" src="https://docs.google.com/presentation/d/
      13WCxr5uG4Jqw8bPJzB6dIdQ3DP2H4nBFRH8FHxlqK0Q/preview"></iframe>
</div>
setInterval(function() {
  $('#presframe').contentWindow.location.reload(true);
}, 3000);
Rory McCrossan
  • 331,213
  • 40
  • 305
  • 339
  • Your fiddle works fine for me, the content is reloaded without a 404. However, why would you want to refresh the iframe every 3 seconds in the first place? – Rory McCrossan Nov 23 '18 at 09:22
  • Does `$('#presframe').attr('src', $('#presframe').attr('src'));` fix it for you? In which case this would be a duplicate of [this question](https://stackoverflow.com/questions/4249809/reload-an-iframe-with-jquery). – Jeto Nov 23 '18 at 09:29
  • You can use this: https://jsfiddle.net/ezswtxk7/34/ – son pham Nov 23 '18 at 09:34

0 Answers0