8

What is the meaning of the integer at the end of a Saves list URL? For example, my first Saves list has the following URL:

https://stackoverflow.com/users/saves/10794031/75

Why is the last number 75?

3
  • I first posted this as an answer under the Saves announcement, but I think it's relevant enough to be posted as a separate question.
    – bad_coder
    Commented Oct 5, 2022 at 5:05
  • 3
    I expect that this is the list ID, but I'm not at my computer to confirm. If that's the case, removing it should bring you to all of your saves instead of a specific list.
    – Kyle Pollard StaffMod
    Commented Oct 5, 2022 at 5:46
  • 1
    @KylePollard I wonder if behind the scenes fixed lists, like "For later" have negative ID, like feed users in SE chat? Commented Oct 5, 2022 at 6:56

1 Answer 1

5

An educated guess, based on some tests I did yesterday and the way most other things (posts, users, comments) are modeled: they are stored in a table (let's say Saves) with an automatically incremented primary key (let's say Id). The number you see is simply that ID.

Also, wouldn't it be more elegant to keep an incremental integer per user (like a dependent DB key instead of an ever increasing site-wide long int)?

More elegant with regards to the end result, perhaps, but certainly not more elegant when it comes to the code. There's nothing simpler than let the database generate a unique ID, and you don't need to maintain code which you don't have to write ...

In other words, 75 simply means it's the 75th list created by all users together on the site, just like the user ID 10794031 means you're the 10794031st user on the site. Some older lists may already have been deleted, of course, so the total number of lists may be lower.

Note that the default 'For later' list does not have an ID, only custom lists get an ID. And the 'All saves' page does not have an ID either, but the keyword all instead of a number in the URL.

3
  • 3
    Assuming this is a feature that will stay for years to come I'll defer accepting and will wait for the official staff answer. Also, wouldn't it be more elegant to keep an incremental integer per user (like a dependent DB key instead of an ever increasing site-wide long int)?
    – bad_coder
    Commented Oct 5, 2022 at 5:54
  • 1
    @bad_coder Merging accounts might make that messy. Commented Oct 5, 2022 at 6:25
  • You can greatly simplify the first part with using "list ID" , people should know what it means. :-) Commented Oct 5, 2022 at 6:54

You must log in to answer this question.

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