2052xx
2xx — Success
Reset Content
Tells the client to reset the document view, such as clearing a form.
What it means
The HTTP 205 Reset Content response status tells the client to reset the document view, so for example to clear the content of a form, reset a canvas state, or to refresh the UI.
Like the 204 No Content response, a 205 response MUST NOT contain a message body.
How it works
- 1A user submits a form.
- 2The server successfully processes the form.
- 3The server responds with 205 Reset Content.
- 4The browser clears all the form fields so the user can enter another entry.
Why you're seeing this
- • The server successfully processed data and wants the client to reset.
How to fix it
- • If you are using a modern SPA framework (React, Vue), you must manually listen for the 205 status and trigger your own state reset, as fetch/axios do not automatically clear React states.
Framework Implementations
Express.js
app.post('/submit-ticket', (req, res) => {
database.save(req.body);
res.sendStatus(205);
});Real-Life Scenarios
Use this when a user is doing rapid data entry (e.g., scanning barcodes or submitting multiple tickets in a row) where the primary action after success is simply clearing the input fields.
Inventory Scanning
A warehouse worker scans a barcode. The server records it and returns 205. The web app instantly clears the input field so they can scan the next item.
HTTP Transaction
1. Client Request
POST /inventory/scan HTTP/1.1 Host: api.warehouse.com Content-Type: application/x-www-form-urlencoded barcode=123456789
2. Server Response
HTTP/1.1 205 Reset Content Date: Tue, 04 Jul 2024 12:00:00 GMT Connection: keep-alive
SEO Implications
No direct SEO implications.