3 ms·
This is an odd article. I thought it must have been written in the nineties for the combination of obvious (see above) and bizarre (“web browsers and people mos
by nailer 3y ago
This is an odd article. I thought it must have been written in the nineties for the combination of obvious (see above) and bizarre (“web browsers and people mostly don't care about or notice the HTTP return code” advice). Your JS is absolutely likely to check response codes.
- stevage 3y agoYeah, I started doubting myself - I do often write code that checks response codes. I have to admit, I'm actually not sure what a browser does if a server is sending normal content but with 404 status codes. At the very least, I guess it messes up the caching?
- nubinetwork 3y agoI know google treats it as a "soft 404"... There was a video on YouTube that talked about how browsers and bots handled different status codes, but I'm having a hard time finding it. Found it. https://youtu.be/4OztMJ4EL1s https://youtu.be/4OztMJ4EL1s
- shkkmo 3y agoFrom the http spec about 4xx errors: > Except when responding to a HEAD request, the server SHOULD send a representation containing an explanation of the error situation, and whether it is a temporary or permanent condition. So sending content alongside a 4xx error should be the standard behavior and browsers should display that content. Not sending/displaying that content is the non-standard behavior.