I've been working on a single-page application where one page triggers server requests every time it loads. After making changes and deploying them, I noticed that the live version of the application was not reflecting the updates. Even though the changes were being saved to the database, the old records kept showing up after reloading the page. This issue doesn't occur in the local environment.
To troubleshoot, I manually deleted the cookies and then refreshed the page, which finally displayed the current changes. However, this raised some questions for me:
- Why does Chrome display old data when the request is made to the server and pulls updated records from the database?
- Could this be due to cookies? If so, what's the solution for this problem since end users may not know how to delete cookies? One potential fix could be deleting old cookies whenever the page is loaded, but then it defeats the purpose of having cookies at all.
- Does this issue only occur in V8? How do other JavaScript runtime environments like SpiderMonkey handle this type of situation?
Best regards,