Refused to get unsafe header "Content-Range"

330 views
Skip to first unread message

hammer ren

unread,
Sep 5, 2017, 12:01:13 PM9/5/17
to PDFTron WebViewer
When we load pdf document in Chrome and got following error and warning in console:

Refused to get unsafe header "Content-Range"
CoreControls.js:745 Could not use incremental download for url ... Reason: Could not retrieve Content-Range header.


Justin Jung

unread,
Sep 5, 2017, 7:06:36 PM9/5/17
to PDFTron WebViewer
Hello,

Does the document fail to load when you see that error message?

Justin Jung
Software Developer
PDFTron Systems Inc.

hammer ren

unread,
Sep 6, 2017, 12:18:14 AM9/6/17
to PDFTron WebViewer
No, the document is till loaded. But I'm afraid it's not taking benefit of linearised pdf performance wide. Any comment?

Justin Jung

unread,
Sep 7, 2017, 7:06:02 PM9/7/17
to PDFTron WebViewer
It may be related to cross origin issues, and you could try exposing Content-Range header in your server explicitly.
The issue posted here seems similar, and resolved by exposing the header. See here for details: https://github.com/mozilla/pdf.js/issues/3150#issuecomment-17582371
Reply all
Reply to author
Forward
0 new messages