Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

63 lines (39 sloc) 1.688 kb


Build Status

Garlic.js allows you to automatically persist your forms' text and select field values locally, until the form is submitted. This way, your users don't lose any precious data if they accidentally close their tab or browser.

Demonstration / Documentation



See CHANGELOG for more info.


  • Improve doc and api;
  • Refactorize some code;
  • Work on inputs radio and textarea where there are conflicts;
  • And much more, for fun!

Run tests

  • In your browser: go to tests/index.html
  • Headless tests: install mocha-phantomjs with npm: npm install -g mocha-phantomjs and then run ./bin/

Make production minified versions

You'll need ruby, and Google Closure compiler: gem install closure-compiler. Then, just call:

./bin/ version where version is the build release. eg: ./bin/ 1.1.2

They'll be created and dumped in the dist/ directory


  • @cdmoyer
  • @johnrees
  • @Marfa
  • @leondewey
  • @willdurand
  • @nashby


  • fork repository
  • add your changes to garlic.js
  • add / update tests to test suite (tests/index.html / tests/tests.js)
  • run tests (see above)
  • create new minified versions with minify script (see above)
  • make a Pull Request!

Used / Inspiration


MIT - See

Jump to Line
Something went wrong with that request. Please try again.