# Manually updating HTML5 local storage?

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?

• Of course it is possible, you can do the same with never expiring cookies also. Or, by providing web based user authentication that holds what version / revision the particular user is using, if lower than production, update. This approach has no downsides! There is also an option to serve files with version number, like texture.jpg?v=2012-29-06-1429, and, if the version has changed, the file, in theory, would get auto re-downloaded. Jun 29 '12 at 11:31