Garlic.js
Garlic.js is a lightweight JavaScript library that automatically saves form field values to the browser's localStorage, preventing data loss if a user accidentally closes their tab or browser. Implementation requires only adding `data-persist="garlic"` to form tags, and the library offers configuration options like domain-wide storage, custom callbacks for retrieval and persistence events, and conflict management between stored and database values. The minified version (~5K) requires jQuery or Zepto and is compatible with modern browsers (IE8+, Chrome 4+, Firefox 4+, Safari 4+, Opera 11+).