4 ms·
I'd say the reason why following spec on status codes has fallen out of favor is because browsers don't do anything interesting or informative with them for mos
by nkozyra 12y ago
I'd say the reason why following spec on status codes has fallen out of favor is because browsers don't do anything interesting or informative with them for most users.
On APIs, I'd say it's a sin to not return proper HTTP headers, but when the end user on a web site sees a File Not Found that's 200 Status OK versus File Not Found that's 404, it doesn't really matter.
And while it matters for things like the Googlebot, over the years developers stopped caring, because delivering an attractive and descriptive status page was more important than delivering an error status and not rendering a page at all.
I'm not saying it's right, but it was largely a ornamental step in the early days of the Web, so I understand why it disappeared. If browsers proactively provided data to users about HTTP status codes, I think they'd be adhered to much more.
- seandhi 12y agoReturning a 404 status code and displaying an attractive and descriptive status page are not mutually exclusive. If you go to http://www.google.com/unknown http://www.google.com/unknown, you will get a 404, but you will also see a custom page.
- nkozyra 12y agoAbsolutely, I don't disagree. I'm saying that for most end users, there's no distinction. Status codes are for machines, but if early browsers did something noteworthy with those codes, developers wouldn't have been so quick to dismiss them in a way that is now largely habit.