I have an application running node.js in the backend and react.js at the front.
I have encountered a bug that happens when I log in as a admin, log out and immediately try to log back in as a customer without refreshing the page. When I do that the user logs into the admin account that was just logged out.
In my attempt to debug this issue i checked to see if my auth cookie was being removed successfully upon logout and it does. So what I checked was if the cache was interfering in the bug by not refreshing the page, just clearing the cache (Ctrl+Shift+R) and trying to log as user using the same steps. This works 100% of the time, which probably means that the problem is the browser cache.
I did some research and there is a way to "remove" cache by using meta tags like this:
<meta http-equiv='cache-control' content='no-cache'>
<meta http-equiv='expires' content='0'>
<meta http-equiv='pragma' content='no-cache'>
I wanted to make sure that not storing cache does not interfere in the performance of my app, and if it does I would like to know if someone knows a way to turn this around.
localStorage?