iNettuts with Cookies!

Recently I wrote a tutorial for NETTUTS.com which was published on Monday. "How to Mimic the iGoogle Interface": The tutorial takes the reader through the process of developing a mimic of the iGoogle interface using jQuery and its UI library.

Many of the comments have been really positive, thank you, it’s great to see all my hard work paid off! πŸ™‚

Anyway, a few of the commenters wanted to know how they could save user preferences in some way, and some of them specifically mentioned ‘cookies’ as a reasonable storage medium for such data. To be realistic, the only alternative would be if you had a user-membership system, in which case a database would be ideal..

I’ve created a new (extended) version of ‘iNettuts’ which has the capability to save preferences to a cookie. It seems to work quite well, I’ve tested it on all the main browsers and it’s totally operable!

See the cookie demo | Download the new source.zip

To tryout the new cookie goodness try moving around a couple of the widgets or changing their titles/colours, then refresh the page, or even close the browser, re-open it and go back to the page, your widgets should be just how you left them!

Note: A widget’s collapsed/un-collapsed state is NOT saved – I might work this in at a later stage. « It now saves a widget’s collapsed state!

Thanks for reading! Please share your thoughts with me on Twitter. Have a great day!