data in SessionStorage survives a page refresh, data in LocalStorage even a restart of a browser.
JavaScript / ECMAScript
Most browsers come with the ability to run programs locally (that is in the web browser itself as opposed to in the webserver). This programming language is based on the ECMAScript language and implemented as JavaScript.
See also
A web page being rendered in a brower can be accessed and manipulated through the document object.