Different types of storage in HTML 5 HTML 5 has the capability to store data locally. Previously it was done with the help of cookies. Exciting thing about this storage is that its fast as well as secure. There are two different objects which can be used to store data. 1. localStorage object stores data for a longer period of time even if the browser is closed. 2. sessionStorage object stores data for a specific session.