DEV Community

Cover image for HTTP Status Codes That Will Make You Think

HTTP Status Codes That Will Make You Think

Pragati Verma on September 24, 2023

Last year, I wrote an article on how we might be using some of the HTTP status codes wrong, and this time I discovered some HTTP status codes that ...
Collapse
 
nokesi13 profile image
nokesi

You could serve every language under the same url and then use content-negotiation of the Accept-Language header, but I wouldn't recommend that.

I would rather suggest that on your web sites root url, you issue a redirect (303 - See Other) to a language sub page (E.g. /en). When you do that, respond with a Vary header, that specifies Accept-Language (And any other relevant headers, such as Cookie). That way, any intermediaries (proxies, caches) will be able to cache the response. I would specifically not issue a 301, since you still want links to point to the root url. On the language-specific page, I would put a rel="canonical" to the root url.
Regards: how to enable repost on tiktok

Collapse
 
epi2024 profile image
Je Phiri

Thanks for this article.

Collapse
 
pragativerma18 profile image
Pragati Verma

I am so glad that you found this interesting. Thank you so much for reading it through😁

Collapse
 
kurealnum profile image
Oscar

I think the only one that I've ever seen before is 300! I can't believe that there are so many!

Collapse
 
pragativerma18 profile image
Pragati Verma

Yeah, exactly how I felt when I was reading about these status codes!

I have almost never seen these status codes being used, but their use cases are so interesting.

Collapse
 
yogini16 profile image
yogini16

Nice article. Really loved the detailed explanation.
Some more information for the same here

Collapse
 
bladearya profile image
Amit Kumar Rout

Nice Article

Collapse
 
rohan843 profile image
Rohan Sharma

Nice article! Very informative

Collapse
 
pragativerma18 profile image
Pragati Verma

I am glad you found it helpful. 😁

Collapse
 
valkeamedia profile image
Valkea

Nice job. Thanks for sharing

Collapse
 
pragativerma18 profile image
Pragati Verma

I am glad you found it helpful. 😁

Collapse
 
whobeu profile image
Robert G. Schaffrath

My Apache server is often throwing 406 from oddball hacking attempts to compromise it. Never really paid much attention to what the request headers look like to throw it but take satisfaction in the server being safe from such attempts.

Collapse
 
webjose profile image
José Pablo Ramírez Vargas

418 is part of the standard.

Collapse
 
pragativerma18 profile image
Pragati Verma

Yes, but I meant to say that it's not an industry standard, as it has no practical use case and is merely a humorous existence.