nodejs / nodejs/undici

Add support for Priority Hints

Open
#1,748 5 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
7.7k
Forks
880
Avg merge
2d 16h
Merged PRs (30d)
68

Description

The Priority Hints spec is in the process of being merged into the fetch and HTML specs and allows for site developers to hint at the relative fetch priority for various resources.

The main changes are:

Adds a "priority" to fetch's Request and RequestInit classes that uses a string enum of "auto", "high" or "low"
Adds a "fetchPriority" attribute to the IMG, PICTURE, SCRIPT, LINK and IFRAME html elements with the same enum values
Existing spec: https://wicg.github.io/priority-hints/

This was shipped in Chromium 103 and Mozilla is working on an implementation so it is now in the process of being moved into the HTML and fetch specs.

For node, the main use case is on the fetch interface to pass through prioritization to the underlying networking stack.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the fetch interface and the Request and RequestInit entry points, then compare their current behavior with the Priority Hints specification linked in the issue. Done means fetch requests accept the auto, high, and low priority values and pass prioritization through to the underlying networking stack.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.