Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is HTTP 404 appropriate for out of range page number on paged content?

I have a site that is mainly showing a paged list of content (articles, data element's, etc.), and I'm wondering about returning HTTP 404 when user navigates outside of the available list range (eg. by hand edited url).

Some sites just display "No results/Page number out of range" and some return additionally return HTTP 404 status.

What's your take on that, and why?

UPDATE

It's not and api response. This question is in regard to user viewed pages that among other things show a list/table in the main area.

UPDATE

Borderline example: 1'st page is a page out-of-range because no data for the shown list exists yet.

Should I show 404? If it where search result's I wouldn't mind... but for plain viewing of paged list/data table seems harsh.

Example: the first day of Stack Overflow run and no questions exist yet, you hit the home page and what, 404 or just a 200 with "No questions yet" message?

like image 440
Janusz Skonieczny Avatar asked Mar 31 '10 14:03

Janusz Skonieczny


1 Answers

I'd say this is absolutely a case for a 404. It's a request for a resource that doesn't exist. Whether the general page/script used to display the items is irrelevant.

like image 146
Pekka Avatar answered Oct 13 '22 18:10

Pekka