Just as a tip, you're relying on some cutting edge, technically not official features of an unfinished HTML specification (HTML 5). If you have that luxury then good on ya, but I foresee much pain in your future.
Gregg Bolinger wrote:Just as a tip, you're relying on some cutting edge, technically not official features of an unfinished HTML specification (HTML 5). If you have that luxury then good on ya, but I foresee much pain in your future.
In that case, what are my options to store some user preferences?
Is cookie a good idea?
Joined: Nov 08, 2001
Reason you do not store user preferences on the server?
Cookies may not be enabled, they can only hold so much information, they get sent to the server with every request.
The purpose in HTML5's local storage feature is to allow your users to use the application offline. Google created gears because they wanted people to still be able to access their email, documents, calendars, etc even if they didn't have a connection to the internet. It was not meant to store user preferences (unless you need them for offline viewing).
As Eric said, store it on the server. In fact, no matter what you do with local storage, everything should still be on the server. That's the point. Use local storage when you need it, but always have it on the server.
Bear Bibeault wrote:I foresee this as the next shiny new toy that will be used badly and needlessly just because it's "cool".
My problem with local storage (not specifically HTML5) is that any Tom, Dick, and Harry can write a web application that stores who the hell knows what on my local computer. Cookies are one thing, controlled. But who's stopping Dick (pun intended) from loading his data warehouse on my local machine? You know, just because he can.
subject: client side storage for firefox, chrome & IE