Live data from Hacker News

Show HN: garlic.js - don't let your users lose their form data

guillaumepotier.github.com

71–80 of 109 posts

Re: Show HN: garlic.js - don't let your users lose their form data

#72
post #54

Earlier quoted context omitted.

It's still a work in progress, but of course! I have many (many!) bookmarked pages with more libraries in my instapaper feed, some emails to myself and a few emacs .org files I use as buckets. I just decided to start collecting them last week and made a quick sweep-clean with the most recent tabs I had open and the few I had linked to recently: 1.1 Markdown 1.1.1 http:// attacklab.net/showdown/ 1.2 DBs 1.2.1 http://j…

Anyone else ending up on a "UPVC Doors and Windows" site when going to http://jsunittest.com/ ?

Hmmm indeed. I'll find another one ;)

Re: Show HN: garlic.js - don't let your users lose their form data

#73

I think the desire for this kind of project is very reasonably based, and it looks like you have done great work on most of the implementation. I have one gripe with it, though. It would be nice if the documentation mentioned that garlic.js requires an HTML5 browser with localStorage implemented. Remember, there are people who are still using Internet Explorer 6 and 7, and these browsers are incompatible [1]. This is…

If you want to support this on IE 6/7, just add a shim that uses userData behaviors for localStorage. Here's one: https://github.com/mattpowell/localstorageshim

Re: Show HN: garlic.js - don't let your users lose their form data

#74
post #54

Earlier quoted context omitted.

It's still a work in progress, but of course! I have many (many!) bookmarked pages with more libraries in my instapaper feed, some emails to myself and a few emacs .org files I use as buckets. I just decided to start collecting them last week and made a quick sweep-clean with the most recent tabs I had open and the few I had linked to recently: 1.1 Markdown 1.1.1 http:// attacklab.net/showdown/ 1.2 DBs 1.2.1 http://j…

Anyone else ending up on a "UPVC Doors and Windows" site when going to http://jsunittest.com/ ?

Jsunit's site is dead, too. http://qunitjs.com/ looks like a good one having similar abilities (test in browser was my main feature for this one)

Re: Show HN: garlic.js - don't let your users lose their form data

#77

Should add an option for users to disable this (like remember me on login forms)... not good for public computers if you don't know the form you just filled in but didn't submit will retain the data. Other than that, cool!

Persisting localStorage seems to be controlled by the setting to delete cookies after exiting the browser. If i have it set to delete cookies, it deletes localStorage. if i allow it to keep cookies after quitting the browser, then it persists localStorage. (Noticed this because the demo failed for me the first time.)

Are you sure of that? I've tested the behavior of cookies / localStorage on iPads recently, and on private sessions without cookies, Safari on iPad had localStorage persisted.

Re: Show HN: garlic.js - don't let your users lose their form data

#78
post #6

Earlier quoted context omitted.

It would also be nice if the documentation mentioned that it requires jQuery.

Hmm, what does jQuery provide that is so essential that someone decides to add a dependency this big for something so simple? It seems that everything requires jQuery these days, even when a 5-line for loop would do.

It seems to use it for events, selectors, and data attributes.

Some uses are unnecessary, eg. using `closest` to get the container form element. `element.form` can be used on any form input or control to access the form itself.

I dunno though. I don't like adding jQuery as a dependency but there are still some cases where it's just pragmatic, especially with handling events.

Post reply on HN