I don't know what your game is, but I think your game will resume to the last level you played.
1.) You need a global variable which save the current level. (let's say the name is "CURRENT_LEVEL").
2.) then, everytime the player complete a level, check whether CURRENT_LEVEL is greater than (your_webstorage_key) or not. If yes, then add 1 to CURRENT_LEVEL, and save it to (your_webstorage_key).
3.) then, when your game is being opened, set CURRENT_LEVEL to (your_webstorage_key) to resume.
Sorry for my bad english.