Remove support for moz-prefixed XHR responseTypes (moz-blob, moz-chunked-text, and moz-chunked-arraybuffer)
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: Ms2ger, Assigned: twisniewski)
References
(Blocks 2 open bugs)
Details
(4 keywords)
Attachments
(1 file)
Updated•10 years ago
|
Comment 1•9 years ago
|
||
Comment 2•8 years ago
|
||
Reporter | ||
Updated•8 years ago
|
Comment 4•8 years ago
|
||
Comment 5•8 years ago
|
||
Comment 6•8 years ago
|
||
Comment 7•8 years ago
|
||
Comment 8•8 years ago
|
||
Comment 9•8 years ago
|
||
Comment 10•8 years ago
|
||
Comment 11•7 years ago
|
||
Updated•6 years ago
|
Comment 12•6 years ago
|
||
Updated•6 years ago
|
Assignee | ||
Comment 13•6 years ago
|
||
Yury, does PDF.js still need -moz-chunked-arraybuffer, now that ReadableStreams should be working? Should we try removing it now?
Updated•6 years ago
|
Assignee | ||
Comment 14•6 years ago
|
||
baku, it seems that pdf.js is no longer a concern as far as removing platform support for -moz-chunked-arraybuffer (as per bug 1411865 comment 5). Did we know of any other reason to not try removing it, now that we support ReadableStreams?
Comment 15•6 years ago
|
||
(In reply to Thomas Wisniewski [:twisniewski] from comment #14)
baku, it seems that pdf.js is no longer a concern as far as removing platform support for -moz-chunked-arraybuffer (as per bug 1411865 comment 5). Did we know of any other reason to not try removing it, now that we support ReadableStreams?
No other reasons. I still see browser/extensions/pdfjs/content/PdfJsNetwork.jsm using moz-chunk-arraybufer here:
https://searchfox.org/mozilla-central/rev/56705678f5fc363be5e0237e1686f619b0d23009/browser/extensions/pdfjs/content/PdfJsNetwork.jsm#102
If this can be removed, we can remove the support for moz-chunk-arraybuffer.
Assignee | ||
Comment 16•6 years ago
|
||
In that case I suspect that we just need someone to review the patch on bug 1411865 so it can land.
Comment 17•6 years ago
|
||
"moz-chunked-arraybuffer"
usage is conditional on the onProgressiveData
callback being set.
In mozilla-central this callback is never set: https://searchfox.org/mozilla-central/search?q=onProgressiveData&redirect=false
The callback is only set when used in the generic web version of PDF.js: https://github.com/mozilla/pdf.js/blob/9b5a937f78418ad6b114ca66d062cf2ae416d05f/src/display/network.js#L321-L322
So removing "moz-chunked-arraybuffer"
will not affect the built-in PDF.js. At most it affects old PDF.js versions on the web that haven't been updated to use the streams API. In this case, the library will fall back to Range requests. Although not optimal, the basic functionality still works, so that shouldn't block the removal of this.
Assignee | ||
Comment 18•6 years ago
|
||
remove support for XMLHttpRequest moz-chunked-arraybuffer response type
Assignee | ||
Comment 19•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Comment 21•6 years ago
|
||
Comment 22•6 years ago
|
||
bugherder |
Updated•6 years ago
|
Comment 23•5 years ago
|
||
Posted site compatibility note: https://www.fxsitecompat.com/en-CA/docs/2019/xhr-moz-chunked-arraybuffer-response-type-is-no-longer-supported/
Comment 24•5 years ago
|
||
The alternative to the functionality moz-chunked-arraybuffer
is not arraybuffer
, but using fetch
and readable streams.
XMLHttpRequest
+responseType = "moz-chunked-arraybuffer"
offered the ability to receive the response in chunks (as anArrayBuffer
; other types are available asmoz-chunked-text
andmoz-chunked-blob
, but the latter are not documented on MDN).XMLHttpRequest
+responseType = "arraybuffer"
offers the response as anArrayBuffer
, but only once the full request has been received.fetch
+ readable streams offers the ability to read the response in chunks - see https://developer.mozilla.org/en-US/docs/Web/API/Streams_API/Using_readable_streams#Consuming_a_fetch_as_a_stream
Could you update the webcompat article?
We should also update the "moz-chunked-arraybuffer" section of https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseType , to mention the deprecation and link to the alternative.
Comment 25•5 years ago
•
|
||
Hi Rob, thanks for your feedback! I’ve corrected the site compatibility note accordingly.
Comment 26•5 years ago
|
||
Looks good. I've also updated the MDN article above to note the removal and the alternative.
Comment 27•5 years ago
|
||
Rob, thanks for that update. I've made a few adjustments and have submitted BCD PR 4349 to update the compatibility data for this.
Also added to Firefox 68 for developers.
Description
•