Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use Fetch API where available (Firefox, Chrome, Opera) #6348

Closed
nschloe opened this issue Aug 12, 2015 · 4 comments
Closed

use Fetch API where available (Firefox, Chrome, Opera) #6348

nschloe opened this issue Aug 12, 2015 · 4 comments
Labels

Comments

@nschloe
Copy link
Contributor

nschloe commented Aug 12, 2015

Right now, pdf.js uses XMLHttpRequest (XHR) for fetching the PDF, see https://github.com/mozilla/pdf.js/blob/master/src/core/network.js.

With the recent development of the Fetch API (released in Chrome 42, Firefox 39, Opera 30), a clean replacement for XHR is now in place; see

It can easily be detected if the current browser has fetch(), so this indeed looks like a interesting alternative.

@timvandermeij
Copy link
Contributor

Interesting, that sounds awesome. If someone is willing to work on this, feel free to submit a pull request. We must be sure to remain compatible for old browsers, so we probably need a fallback to XHR or a polyfill for fetch() to do so.

@yurydelendik
Copy link
Contributor

Dup of #5319 ?

@existentialism
Copy link
Contributor

Also #6126

@timvandermeij
Copy link
Contributor

Right, closing as duplicate of #6126. Let's continue there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants