© Risto Viita/Shutterstock
Utilizing Web Storage
FOR YEARS, COOKIES WERE the only option available to most Web developers for storing temporary information. Using a cookie, a developer could store up to 4KB of data. A website might, for example, use a cookie to track the items in a your shopping cart from one site visit to the next or track your preferences while traversing a site. HTML 5 expands beyond the storage capabilities that cookies provide to allow session-based storage and long-term storage. The session-based storage exists until you leave the site or close the window. In contrast, the long-term storage persists until you or ...