103 Early Hints
Example HTTP Response
HTTP/1.1 103 Early Hints
Link: </style.css>; rel=preload; as=style- Preloading resources while server prepares response
- Sending Link headers early for faster page loads
- Optimizing perceived performance
What does this mean?
A sneak peek! The server is giving you hints about what's coming, like a movie trailer before the main feature.
Technical Definition
Used to return some response headers before final HTTP message.
RFC Says
"The 103 (Early Hints) informational status code indicates to the client that the server is likely to send a final response with the header fields included in the informational response."
Plain English:
The server is giving you a preview of what resources you'll need (like CSS and JavaScript files) before the final response is ready. This lets your browser start downloading them immediately for better performance.
Ready-to-use code for returning this HTTP status in your application:
// Express.js
app.get('/example', (req, res) => {
res.status(103).json({
error: 'Early Hints',
message: 'Your error message here'
});
});
// Native HTTP
const http = require('http');
http.createServer((req, res) => {
res.writeHead(103, { 'Content-Type': 'application/json' });
res.end(JSON.stringify({
error: 'Early Hints',
message: 'Your error message here'
}));
}).listen(3000);103 Early Hints FAQ
What causes a 103 Early Hints error?
Preloading resources while server prepares response. Sending Link headers early for faster page loads. Optimizing perceived performance.