Wrong "latest dashboard" version is selected when using browser-option "restore last session"

Description

We recently discovered a confusing problem with Grafana dashboards.
After a user saves some changes in a dashboard and afterwards restarts the browser, the dashboard is shown in a version before the last save. This is highly confusing, especially because it happens to the user who just saved a new dashboard version…
Fortunately, this is not a permanent problem, as it can be solved simply by reloading the tab. Still: you have to know about this or you’ll find yourself constantly restoring the dashboard to the “real” latest version unnecessarily… In fact, this is what’s happened in my company several times now: users restore the “real latest version” and thus create a new version… Only because they think someone reset the dashboard to an earlier version or something…

Reproducable steps

  1. (setup browser to “restore last session” when starting)
  2. create a new dashboard and save it
  3. change something and save again, effectively creating a second version
  4. close browser and start it again
  5. the initial dashboard version will be shown
  6. check the dashboard versions and recognize the wrong “latest” version

The following screenshot has been made at step 5:

Further Information

This happens only if the browser is configured to reopen “last sessions”, so the Grafana tab will be opened instantly when the browser (re-)starts. Also, a simple reload of the tab solves the problem.
Nevertheless, IMHO this should be investigated because it’s a confusing behaviour.

Environment

  • Grafana Version 5.2.2
  • MySQL Backend
  • Firefox Browser Version 60.0.2

Expected behaviour

Regardless of the browser settings, a user should always be looking at the correct latest dashboard version. Looks like something could be done about that, because the “versions” view clearly shows every available versions correctly, only does not pick the right one.

has anything been done to help with this?? This problem has been around for quite some time.
We’ve been dealing with it for awhile. Sometimes the version isn’t updated, and sometime the dashboard isn’t updated. We’ve tried many versions of 9.xx, 10.xx and 11.xx and all seem to do the same thing… very frustrating, to say the least. It seems that when the versions aren’t showing up, deleting the browser history, and then doing a refresh brings in the correct versions. I’ve turned my browser cache off so that I could be sure it’s working when the history is deleted. How does the history affect getting the correct versions?? Anyone have any ideas here?