Manually updating HTML5 local storage?

Posted by hustlerinc on Game Development See other posts from Game Development or by hustlerinc
Published on 2012-06-29T02:09:35Z Indexed on 2012/06/29 3:24 UTC
Read the original article Hit count: 263

Filed under:
|

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?

© Game Development or respective owner

Related posts about JavaScript

Related posts about html5