title: loading only needed pages from the server when using pdf.js
body: <p>I am using pdf.js to view pdf documents, pdf.js firstly fetches the whole document from the server then starts rendering, and this behavior causes two problems:</p>
  
  <ul>
  <li>if the pdf document is large, it takes a long time to load.</li>
  <li>cache memory leaks if someone reads from mobile devices.</li>
  </ul>
  
  <p>I think using http range requests by requesting only the required pages the user browse, not the whole document, will solve these problems.</p>
  
  <p>Here is a PR that implements range requests but the requests still running till the whole document loaded not with a fetch-as-you-go behavior.
  <a href="https://github.com/mozilla/pdf.js/pull/2719" rel="nofollow">https://github.com/mozilla/pdf.js/pull/2719</a></p>
  
  <p>any help?</p>