You are reading a single comment by @danb and its replies. Click here to read the full conversation.
  • Whenever you look at something, we store a record in the database. It's never cached, it's read every time.

    Are you definitely signing in with the same account across all devices?
    Have you ever pressed the "Mark Everything Read" link on the home page?

  • I am seeing this behavior as well - reading threads in Chrome on Android and then going back to them after seeing new posts using Chrome on desktop takes me back to the first unread post that I saw on Android....

  • My old low spec Android has this behaviour in default browser & Opera.

  • I know it sounds obvious, but are you doubly-sure you weren't logged out on Android?

    When the page is requested, we update the read entry for your user. It's possible (but unlikely) that failed, so will check the logs.

  • Wait, what?

    I am seeing this behavior as well - reading threads in Chrome on Android and then going back to them after seeing new posts using Chrome on desktop takes me back to the first unread post that I saw on Android....

    Can your describe this as a timeline so that I can recreate it.

    Something like:

    1. Android: Read page 160 of this thread
    2. Desktop: Read page 161 of this thread
    3. Android: Accessed and /newest/ takes me to page 160

    /newest/ isn't cached, and it's only a "302 Found" which your browser should never cache unless it's instructed to, and we go the other way and instruct to really never cache it Cache-Control must-revalidate, max-age=0.

    The SQL is:

    UPDATE read
       SET read = GREATEST(read, $4)
     WHERE item_type_id = $1
       AND item_id = $2
       AND profile_id = $3
    

    And if that doesn't work, then we INSERT (as no read record exists).

    The mind-bending thing is that:

    • There's nothing in the code that could return you to a prior timestamp
    • Any call that we do to mark things as read can only ever increment the value
    • We explicitly tell all browsers to not cache the result of a redirect

    I don't doubt that both yourself and @LongAndWinding are seeing this, I just want to understand so that I can figure out how to fix it.

About

Avatar for danb @danb started