Hey, please follow these steps, i hope helps you,
http://d.top4top.net/p_305a18v01.png
1. in start page of your game you need to do like this image, and you need also to make unique local variable for local storage only, and call it record, (Means every score that user receive will be recorded in record variable,
http://e.top4top.net/p_3055le1c2.png
2. this image here you make a record variable, as you see inside the image, the high score will set same number with the record, set high score to record to stay on the same level that you received, note; ( local storage and record variable never removed if you set item currently.you set this on level selection page.
http://f.top4top.net/p_30579jjx3.png
3. in the whole levels, you must make a sup event behind the score that the use will received to save it in the record, this will save your high score even when you close and open the game in the browser or mobile phone it is the same.