Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it kosher to send a 404 or 410, but still show the content?

There was a lot of discussion about deleted questions over on Meta over the past couple of days. One proposal that came up how to deal with the deletion of questions now deemed off-topic was showing some popular deleted questions to everyone - with the grey look that 10k+ users get when viewing a deleted question.

In that look, the background is greyed out, no interaction is possible, but all the content is still accessible:

enter image description here

I proposed the pages could at the same time send a 404 not found or 410 gone if the overwhelming desire is to phase them out from the search index.

So the content would be shown, but a 4xx status code sent.

However, there was a comment critcizing this idea:

Ehhh why send a 404 when the link exists publicly? You're breaking the semantics of the 404 code

I tend to disagree: what is shown in the response body (to satisfy the curiosity of us humans) doesn't really matter, does it? And machines get the 4xx to work with.

Who's right?

like image 427
Pekka Avatar asked Mar 06 '12 10:03

Pekka


1 Answers

In my mind if you're going to show the original content (yes the colours are different to a human, but not to a search engine) then to return a not found or gone status is not appropriate. It's either there or it isn't; it can't be simultaneously there and not there (unless of course it's Schrodinger's Content).

It would be more appropriate to have the url permanently redirect to a non-indexed archive url instead; or if the original content is genuinely gone then a non-indexed 404 linking to similar content if possible - but I think that needs to be kept short and sweet.

As a user of the internet - I personally hate 404 pages that actually try to display meaningful content.

Ultimately I want to know if you have what I'm looking for or not. If not, then tell me straight. Don't tell me you 'used' to have some content but it was gotten rid of!

like image 153
Andras Zoltan Avatar answered Sep 17 '22 15:09

Andras Zoltan