got a small problem with the game I'm creating.
I'm making a text based game where you have to fight monsters and fulfill quests and stuff, but I got a problem with my sql data not being updated all the time.
For example, I have a situation where you can battle another player. After the battle, the new troop counts of both players are send to an MySQL database through an Ajax command. This works without any problems as I can see the adjusted and correct values in the DB directly. The problem however, is that when I do another battle immediately, the 'old' troop counts still apply and not the adjusted ones from after the previous battle. There is an Ajax command before each battle, to reload the troop counts from the DB each time, but it seems that the browser still takes the cached values instead of the newly values.
If I wait 5-10min, and the check the troop counts, the values are correct, so it seems that it's only 'refreshing' its data every X minutes...
Anyone has an idea how to prevent or solve this?
Develop games in your browser. Powerful, performant & highly capable.
Try to add these two lines in your php file to ignore cashing :