iFrame's pdf content gets loaded twice in Chrome and Opera

I have an iframe inside a modal-body. Every time I open the modal and look into the Network tab in Chrome or Opera's inspect element, I see that the pdf file get loaded twice: first one OK, second time Cancel (screenshot: console_screenshot.png, we're using Durandal framework). It happens in Chrome and Opera, not Safari or Firefox.

HTML code below:

<div class="modal fade" id="myModal">
  <div class="modal-dialog">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        </div>
        <div class="modal-body">
             <iframe src="pdf/helloworld.pdf" width="100%"></iframe>   
        </div>
      </div>
    </div>
</div>

I can only assume this is browser's issue ??? I've been searching everywhere and tried different stuff but nothing seems to solve this. Anyone had this before ? or any suggestion to get rid of the double loading ?

链接地址: http://www.djcxy.com/p/36434.html

上一篇: 在Chrome上PDF重定向显示空白

下一篇: iFrame的pdf内容在Chrome和Opera中被加载两次