Skip to content

Support HTTP Early Hints #1992

@pjebs

Description

@pjebs

Early hints allows the server to hint what other resources the page would need and then the browser can fetch it while the server is processing the main request.

That way, the browser can start downloading CSS/jss/images etc with a head start.

All major browsers support it

https://developer.chrome.com/docs/web-platform/early-hints

Early hints are technically a http2+ feature but all major browsers still understand it (or safely ignore) with http1.1

whatwg/fetch#1698 (comment)

HTTP/1.1 103 Early Hints
Link: </style.css>; rel=preload; as=style
Link: </script.js>; rel=preload; as=script

HTTP/1.1 200 OK
Date: Fri, 26 May 2017 10:02:11 GMT
Content-Length: 1234
Content-Type: text/html; charset=utf-8
Link: </style.css>; rel=preload; as=style
Link: </script.js>; rel=preload; as=script

[… rest of the response body is omitted from the example …]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions