What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 130 Stack Exchange communities.

I was playing around with URLs (boredom, surprise!), when I typed this URL into my browser:

http://stackoverflow.com/posts/-1/comments

I get a great big wonderful... blank page!

Note: the post number is irrelevant, but if it isn't a number I get an internal server error page.

Funnily enough, if I add a number after the /comments part of the URL, like this:

http://stackoverflow.com/posts/-1/comments/1

I can see any comment on the site by it's ID (it doesn't appear to be linked at all to the post ID in the URL), and if that comment doesn't exist, I once again get the server error page.

Maybe I shouldn't be poking around where I don't belong, but now I'm curious - why is there an inconsistency between the blank pages, 404s, and internal server error pages?

share|improve this question
    
You've done it. You've broken their url routing. This is the beginning of the end. –  Anthony Pegram May 29 '13 at 20:56
    
And, um, actually, I get a 404 with the top link. –  Anthony Pegram May 29 '13 at 20:57
    
@user414076 All hail our new god, Jon Skeet! –  Richard J. Ross III May 29 '13 at 20:57
    
@user414076 Hmm, what browser are you using? Definitely getting blank pages with Safari 6.0.4 –  Richard J. Ross III May 29 '13 at 20:58
4  
The /comments are served via AJAX when you click the button to show more comments. They actually return a 404 error code when you access that link. It doesn't make sense if it serves you a visible 404 error page. –  Antony May 29 '13 at 20:58
    
IE8 is on my work machine here. –  Anthony Pegram May 29 '13 at 20:59
    
@user414076 It's blank on FF and Safari, but not on Chrome. But anyways, I think Antony may be right here, I hadn't thought of AJAX. –  Richard J. Ross III May 29 '13 at 20:59
    
@RichardJ.RossIII: Just because the page is blank doesn't mean the error code isn't there. Try checking your Network tools. –  animuson May 29 '13 at 20:59
    
@animuson I see that now. It's still non intuitive, though, as if you use a proper post ID it doesn't return a 404, just a blank page. –  Richard J. Ross III May 29 '13 at 21:04
    
Seems to have been fixed. I am now unable to read those old comments. :( –  hjpotter92 May 29 '13 at 21:35
    
It's funny that the first comment would be made by the first user and it would be a question asking for more comments because of downvotes. The irony of this being a problem from the very beginning is delightful. –  ryan May 29 '13 at 21:46

1 Answer 1

up vote 2 down vote accepted

As Antony noted in the comments here, this route exists because long comment threads are fetched on demand via an asynchronous request.

Here are the comments for the question I'm answering.

This has been around for ages. Before comment permalinks were implemented, it was a handy way to link to comments without relying on them being visible on page load.

There are other associated routes for handling the various things that can happen to comments. You should consider this all an implementation detail.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .