[eluser]Nuu[/eluser]
I am writing a game app where you need to move from one location to another. Each location is represented by an ID.
For example:
ID Location
1 Town
2 Cave
3 Lava Pit
4 Boss Lair
So i have coded a Move controller that will move the player from location to location i.e. //localhost/move/index/2 would move the player to Cave where as //localhost/move/index/3 will move him to the Lava Pit. I also want it done in such a way where you can only go to the Lava Pit from the Cave and not from Town.
Let's say he has successfully moved from Town to Cave to Lava Pit. At this point, he can enter the URL //localhost/move/index/1 and ended up in town. The browser will display the town page since it has been cached. How can I prevent this from happening. Is there a way to force the browser to reload the page instead of using the cached version? That way I can force an validation to ensure the move is possible and reject it is no longer reachable.
In addition, is there a way to force a page reload when the user clicks the BACK button?
Thanks.