No JSON request when clicking latest

(Sam Saffron) #1


  1. Go to /categories
  2. Click /latest (one json req happens)
  3. Click categories
  4. Click /latest (no json req is made)

Something is being cached here that should not.

(lid) #2

To an extent this is good a bug, it saves a json request.

It is also replicable with the pretty much all the views

(Sam Saffron) #3

No, its terrible is not want we intended.

We only need to load cached json IF people hit the back/forward button, this exists to ensure we don’t lose position in topic list.

The way it is now people are constantly complaining about invalid new / unread counts.

(lid) #4

You are probably right, if it comes at the cost of having old cached counters it does hurt functionality.
since a browser refresh is not common with discourse.

(Sam Saffron) #5


Leaving this open for @eviltrout to review.

(Robin Ward) #6

Definitely do not like this approach though, I’m gonna dive in and change some stuff

(Robin Ward) #7

Here’s a commit that does the popState check without having to reach into the location, and unset it afterwards. Should be a lot safer:

(Jeff Atwood) #8

This topic was automatically closed after 24 hours. New replies are no longer allowed.