Manually updating HTML5 local storage?
- by hustlerinc
I'm just starting out HTML5 game developement (and game dev in general) and watching all the videos and tutorials available something has crossed my mind.
Everyone keep saying I should set the cookie's (or cached files) to be expired after a certain amount of time. So that when it reaches that time the browser automatically downloads all assets again, even if it's the same asset's.
Wouldn't it be possible to manually define the version of the game?
For example the user has downloaded all the files for 1.01 of the game, when updating I change a simple variable to 1.02.
When the user logs in it would compare his version to the current and if they are not equal only then it downloads the files?
This could even be improved to download only specific files depending on what needs to be updated?
Would this be possible or am I just dreaming? What are the possible downsides of this approach?