On 1/16/11, Shawn Stringfield <[email protected]> wrote: > I'm actually experimenting with localStorage and cookies. When a user comes > to a page, I will give them the option of seeing the page layout with > thumbnails vs. details of images. The layout is based on them clicking a > checkbox for thumbnails or a checkbox for details. I hope this is more > descriptive of what I'm trying to accomplish. > Saving and retrieving state on the server will will be widely compatible because it doesn't require any javascript.
Displaying the state as the page is loading will cause the page to seem to load faster and smoother, too. This is because when the stored state is different than the default state, changing the layout onload or on "ready" function can cause a visual shift. By loading the correct state frm the server, that is avoided. You can get that state in a variable. See also: <http://jibbering.com/faq/#getServerVariable> -- Garrett -- To view archived discussions from the original JSMentors Mailman list: http://www.mail-archive.com/[email protected]/ To search via a non-Google archive, visit here: http://www.mail-archive.com/[email protected]/ To unsubscribe from this group, send email to [email protected]
