[Apache - Range Requests and Partial Responses ] How do I enable Accept-Ranges header ?

Cozay

New Member
#1
Hi I have hosted a nodejs script to return a PDF document in multiple chunks so that this PDF will load incrementally at the client. This allows large PDF files to be viewed even when the file is not fully downloaded by the client.
But I have a problem with PlanetHoster, because this script does not work there as I designed it. Instead of returning the file in chunks, the server returns the file as a whole. The client is forced to wait for this file to be completely downloaded to read it. For small files, I don't see any disadvantages, but when you have PDFs > 100MB, it spoils the user experience.

I had tested this script on a server from another host, as part of a shared offer with the same characteristics, everything works perfectly. After some research, I learned that with some hosts it is necessary to add this line server.range-requests="enable" to activate the transfer by pieces of files. How do I enable Accept-Ranges header ?
 
Haut