'Why I have the old version of database when I reload the page in vuejs? | vue js 2 [closed]
I have a project made with Vue.js 2
When user make a change in website, it sends to this change to the database. It is successfully saved. But when user reload the page, he could not have the last version of concept map. s/he has the unchanged version.
If user renew the page by deleting all cache then it works and s/he has the new version. I have checked the queries with postman. It returns the correct result but the website still using the old result unless I renew the page by deleting caches.
It was not happening before. But somehow it started to happen. I don't understand why and no idea how to solve it.
Solution 1:[1]
the comment of IVO GELOV is the solution. Thank you The responses from the backend should be marked with a HTTP header ‘Cache-control: no-cache‘
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Birol Y?lmaz |