Code Monkey home page Code Monkey logo

Comments (5)

dougwilson avatar dougwilson commented on June 12, 2024

Hi, thanks for the issue. I'm really not sure what you are asking, unfortunately. Are you able to provide more specifics or even a pull request demonstrating what you are looking for?

from send.

r0mflip avatar r0mflip commented on June 12, 2024

@mhf-ir AFIK HLS and DASH don't use range requests and they usually format individual chunks of size 1MB. You can see a damo at https://players.akamai.com/players/hlsjs It doesn't use any range requests at all to give a partial content. As for your question, send does seem to support partial content responses (https://github.com/pillarjs/send/blob/master/index.js#L675-L687). This can be done by range header which IIRC all modern browers do for large files.

from send.

mhf-ir avatar mhf-ir commented on June 12, 2024

@mhf-ir AFIK HLS and DASH don't use range requests and they usually format individual chunks of size 1MB. You can see a damo at https://players.akamai.com/players/hlsjs It doesn't use any range requests at all to give a partial content. As for your question, send does seem to support partial content responses (https://github.com/pillarjs/send/blob/master/index.js#L675-L687). This can be done by range header which IIRC all modern browers do for large files.

I know hls and dash chunk files all files response 200 not 206.
Partial content is good for great Largfile with single request.

Consider this senario

First request for get file 1GB:
Browser send request to webserver
Web server tell client/browser your file is about **1GB** but take this chunk for example this **8mb**
Browser request again for next **8mb** ... and server give it to client.
Each request could be cached via CDN server if chunk always stick to special number.

https://docs.nginx.com/nginx/admin-guide/content-cache/content-caching/#slice
https://www.nginx.com/blog/smart-efficient-byte-range-caching-nginx/

from send.

r0mflip avatar r0mflip commented on June 12, 2024

@mhf-ir Are you saying that when a client requests the server for a huge file (not an explicit range request), the server should send a partial content back to the client?

from send.

dougwilson avatar dougwilson commented on June 12, 2024

This module already allows you to chunk files under the 200 response code with the start and end options. If this does not work, please provide some specific details and reasons why and we can reopen this issue. It is still generally unclear what the request is.

from send.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.