3

I noticed some strange behavior today. I have created several custom filters and they seem to be giving the site problems or I don't understand the system behind it.

Here is a small example:

Filter: Filter By: No accepted answer,Sort by: Newest, Tagged with: The following tags: discord.py

If I click on the filter I get of course the newest posts, as it should be. If I then look at a post and use the "Page back" button in my browser, which should take me to the page with the newest posts, I get an old score and the questions are outdated, but are shown as "new".

Here the relevant screenshots:

  1. I clicked on my custom filter for the first time, everything works fine:

Clicking on the custom filter for the first time

  1. I clicked on the first question and then went back to my filter page with the "go back" button in the browser, the displayed content seems to be incorrect:

Clicking the "Go back" button in my browser after looking at the first question

Is this intentional or am I doing something wrong? I wasn't sure if it was a bug, so I chose two possibly relevant tags once.

6
  • 2
    This is likely due to browser caching. I've experienced the same behavior for ages. Just refresh the page after you click "Go back" to get the updated view.
    – 41686d6564
    May 1, 2021 at 11:26
  • @41686d6564 Should I better close the post then? I assume StackOverflow can't fix this problem itself if it's really the cache, which would be annoying to clear all the time. I can confirm that after refreshing the page the "error" is solved.
    – Dominik
    May 1, 2021 at 11:28
  • 1
    I'm not an expert on this matter but it looks like there are solutions to this problem. Perhaps they can "fix" it.
    – 41686d6564
    May 1, 2021 at 11:29
  • 3
    Note that this is not specific to custom filters. It's actually the case on all pages where the DOM is updated via javascript. So, you might want to reword the question (and perhaps turn it into a [feature-request]). Edit: I found this possible dup.
    – 41686d6564
    May 1, 2021 at 11:36
  • @AndrewT. Yes, based on the other comment from 41686d6564 I guess I can say that this is a duplicate and the other post actually explains the behavior quite well, although unfortunately there is no solution for it. Thank you!
    – Dominik
    May 1, 2021 at 13:14
  • 1
    Yeah, it's a complex issue, there are server's cache and browser's cache: when you click the question page, you get the latest server's cache of the list, and the browser caches it. After that, everything new is pushed through WebSocket (the "x question with new activity" thing) in real-time as ephemeral(?) change. When you open a new question and go back, the browser will load the browser's cache of the previous server's cache. Refreshing it will then load the latest server's cache again.
    – Andrew T.
    May 1, 2021 at 13:20

0

Browse other questions tagged .