title: iframe print not working in chrome when url starts with https
body: <ol>
  <li><p>I have a requirement to print a page without using window.open and window.print functions. </p></li>
  <li><p>I achieved the same using the below code. This works if the url is not starting with https(atleast that is what I figured). If the url is starting with https then chrome print out a blank page. Sometimes on multiple clicks to print link, page data is shown. This code works correctly in IE and FireFox.</p></li>
  </ol>
  
  <p>I have uploaded a sample test page with this code in below url.</p>
  
  <p><a href="http://mediateqindia.com/testPrint.html" rel="nofollow noreferrer">http://mediateqindia.com/testPrint.html</a> (works correctly)</p>
  
  <p><a href="https://mediateqindia.com/testPrint.html" rel="nofollow noreferrer">https://mediateqindia.com/testPrint.html</a> (blank page on click print link)</p>
  
  <p>Both links are pointing to the same page .</p>
  
  <p>How to fix this to get in working in chrome in https?</p>
  
  <p>Code on page testPrint.html is given below. </p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
    &lt;meta charset="utf-8"&gt;
    &lt;meta name="viewport" content="width=device-width"&gt;
    &lt;title&gt;JS Bindddddddddd&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div id="testPrintDiv" &gt;
  Hiiiiiiiiiiiiiii
  &lt;br /&gt;&lt;br /&gt;
  Hellooooooooooooo
  &lt;br /&gt;&lt;br /&gt;
  World !!!!!!!!!!!!!!!!!!!!!!!!!!!s
  &lt;a href="javascript:printTest();"&gt;Print&lt;/a&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  
  
  
  &lt;script&gt;
  function printTest(){
  var scale=1;
  var contents=document.getElementById("testPrintDiv").innerHTML;
  if(!scale){ 
      scale=".9";
  }
      var printframe = document.createElement('iframe');
      printframe.name = "printframe";
      printframe.style.position = "absolute";
      printframe.style.top = "-1000000px";
      document.body.appendChild(printframe);
      var frameDoc = printframe.contentWindow ? printframe.contentWindow : printframe.contentDocument.document ? printframe.contentDocument.document : printframe.contentDocument;
      frameDoc.document.open();
      frameDoc.document.write('&lt;meta http-equiv="X-UA-Compatible" content="IE=edge" /&gt;&lt;html&gt;&lt;head&gt;&lt;title&gt;&lt;/title&gt;');
      frameDoc.document.write('&lt;link rel="stylesheet" type="text/css" href="/user/data/css/styles-min.css"&gt;');
      frameDoc.document.write('&lt;style type="text/css"&gt;@media print { body {transform: scale('+scale+');} @page{margin-left: 0cm;} body {margin-left:0;padding:0;}'
                  +'&lt;/style&gt;&lt;/head&gt;&lt;body&gt;');
         frameDoc.document.write(contents);
          frameDoc.document.write('&lt;/body&gt;&lt;/html&gt;');
         frameDoc.document.close();
  
         setTimeout(function () {
              window.frames["printframe"].focus(); 
              window.frames["printframe"].print();       
               setTimeout(function () {
                  document.body.removeChild(printframe);
               },5000);
          }, 750);
  
      //return false;     
  }
  
  &lt;/script&gt;
  </code></pre>