To see how localStorage and sessionStorage work go ahead and click the button a few times.

Then refresh the browser ... notice the counts are still remembered.

Now close the browser completely and restart it and bring it back to this page. You'll see that the sessionStorage click count was reset by closing the browser but the localStorage value persists.

Times Clicked This Session: 0

Times Clicked Ever (in the universe): 0

Of course, by "times clicked ever in the universe" we mean "times clicked using this browser while visiting this particular domain/server and using this particular protocol (http or https).