title: javascript jspdf blob freeze browser, web workers?
body: <p>I'm trying to embed client side input images in a PDF which is generated using <code>jspdf</code> library. I got some questions:  </p>
  
  <p>Using jdpdf library I've tried the various options:<br>
  <code>var doc =  jsPDF();</code></p>
  
  <p><code>var bloburl = window.createObjectURL(doc.output("blob")) // freeze the browser in mobile devices
  window.open(bloburl); // or iframe.src=bloburl;</code></p>
  
  <p>The problem is - the UI for few seconds in an average mobile device, so maybe web worker will help somehow? 
  Also when setting blob url to src of something, mobile devices prompt a download, while desktop view them in browser. (I prefer both ways to open PDF in browser, as with any other PDF I open in browser).</p>
  
  <p>another method:</p>
  
  <pre><code>var b64 = doc.output("datauristring");
  window.open(b64); // create a giant string and freeze the browser, but both desktop and mobile will view the PDF in browser, which I prefer.
  </code></pre>
  
  <p><strong>TL;DR</strong><br>
  - Can I Use web workers to prevent browser freeze when generating large blob urls?<br>
  - How can I avoid mobile browsers to prompt download when setting bloburl to src of something? (desktop browsers don't prompt a download).  </p>
  
  <p>Any pointers would be helpful.</p>