Refresh iFrame (Cache Issue)

后端 未结 5 1040
南旧
南旧 2020-12-08 16:01

We are getting a weird issue on which we are not sure what exactly cause it. Let me elaborate the issue. Suppose, we have two different html pages a.html and b.html. And a l

5条回答
  •  醉话见心
    2020-12-08 16:10

    Homero Barbosa's Solution worked like a charm. In my case, I had a varying number of iframes on the page, so I did the following:

    $('.some_selector').each(function () {
      var $randid = Math.floor(Math.random() * 101);
      $(this).attr({'id': 'goinOnaSafari-' + $randid});
    
      var $frame = document.getElementById('goinOnaSafari-' + $randid);
      $frame.contentWindow.location.href = $frame.src;
    });
    

提交回复
热议问题