javascript - Remembering a User Preference with a Cookie -


i want present users 2 options upon entering websites homepage foo.com .

button 1: continue in english (takes them foo.com/english.html)

or

button 2: continue in spanish (takes them foo.com/spanish.html)

a checkbox present, if check remember choice , upon returning foo.com go directly english.html or spanish.html based on previous selection.

i have never used cookies before, , having hard time wrapping head around how this. examples have seen cookies basic, seems more complex me.

any appreciated! in advance.

there number of cookie libraries , jquery extentions available if find difficult dealing them discreetly, g* search should return plenty.

a couple are:

cookies.js
jquery cookies

an alternative cookies use html5 localstorage


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -