Giter Site home page Giter Site logo

HTTP 103 Early Hints about agoo HOT 9 CLOSED

ohler55 avatar ohler55 commented on May 21, 2024
HTTP 103 Early Hints

from agoo.

Comments (9)

ohler55 avatar ohler55 commented on May 21, 2024

Not planned yet. There is nothing stopping an application from returning a 103 though. How would you envision the use case?

from agoo.

evanleck avatar evanleck commented on May 21, 2024

The use-case I envision is a Rack application that plans to include some CSS and JS via <style> and <script> (normal stuff) using early hints to tell the browser to start downloading those files before the full response has been rendered. As I understand it, that's the primary use-case for early hints.

I can't find anything official in the Rack repository, but there's some support across Ruby projects that I've linked to below, as well as the RFC. The Puma PR may be the most interesting.

I think the biggest difference between real early hints and just returning a 103 is that a single request would produce 2 responses: one 103 with early hints Link headers and the other with the full response (e.g. from a Rack application).

from agoo.

ohler55 avatar ohler55 commented on May 21, 2024

Okay, its a feature that might go into the rack spec in the future. Lets leave this issue open for now and time permitting and a bit more research into rack plans and then it will get done.

from agoo.

evanleck avatar evanleck commented on May 21, 2024

Sounds good, thank you!

from agoo.

ianks avatar ianks commented on May 21, 2024

We are currently using nginx with the http2_push_preload directive. This will turn Link headers into push promises. This is a much simpler and more compatible mechanism than sending a 103 IMO

http://nginx.org/en/docs/http/ngx_http_v2_module.html#http2_push_preload

from agoo.

evanleck avatar evanleck commented on May 21, 2024

@ianks that's really cool, thanks for the info! I didn't even know Nginx could do that to be honest. I don't have direct access to the reverse proxy's configuration file so I can't do that myself, but it's definitely good to know.

from agoo.

ianks avatar ianks commented on May 21, 2024

Highly suggest it. Much easier to setup than h2o

from agoo.

ohler55 avatar ohler55 commented on May 21, 2024

Please try the early_hints branch. There is a unit test for the new feature.

from agoo.

ohler55 avatar ohler55 commented on May 21, 2024

Merged into develop branch.

from agoo.

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.