4 ms·
This is useful! How does one learn "you can make links or forms submit but not cause browser navigation by having your server respond with a 204" without readin
by newsbinator 5y ago
This is useful! How does one learn "you can make links or forms submit but not cause browser navigation by having your server respond with a 204" without reading it in an offhand comment on HN?
I mean the status code can be looked up easily, but where would we have read about the "submit but don't cause nav" feature?
- tylersmith 5y agoThe http spec outlines that this was the intended behavior and MDN elaborates on implementation. https://datatracker.ietf.org/doc/html/rfc7231#section-6.3.5 https://datatracker.ietf.org/doc/html/rfc7231#section-6.3.5 https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/204 https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/204