Tutorial search
JavaScript Tutorials
Tutorials
Stuff
Affiliates
Photoshop Templates
Featured Photoshop templates - professional ready to use designs for your next project.
View all templates
JavaScript Cookies Tutorials
We hope that you will enjoy our JavaScript Cookies tutorials. Feel free to contact us if you would like to be a tutorial hero and contribute your own JavaScript Cookies tutorials to our site. Thank you !
The piece of code we will be writing, using the YUI library (my favorite), will allow users to increase/decrease their font size for a block of text, storing the font size in a cookie
so that when they return to the page they don't have to modify the font size again.

Ever wonder how web sites could say, "This page will refresh after every 60 seconds." Without having the surfer press refresh? Well, the answer is in Javascript!

A cookie is a way you can store some information about a user visiting your site. The information is stored on the individuals computer, and thus you do not need any extra server space to customize a page for any amount of users you may have. To use Cookies there are two things you need to do, one is set the cookie, and the other is retrieve a cookie you have already set. Here's a brief tutorial on how to use cookies, and a couple of ideas which you can use cookies for.

Use a few simple lines of JavaScript to verify if cookies are accepted by the target web browser.

If your script relies on JavaScript cookies to store and persist information, it's a good idea to always make sure the user's browser has cookies enabled first. This tutorial shows you how to perform this detection.

Using cookies, this script records the date+time of your visitor's last visit and displays it upon their return. If this is their first visit to your site, a greeting message is shown instead.

Learn about session-only cookies in JavaScript, and how they can help your scripts retain information even after the page is reloaded or cleared.
Total Tutorials in Category: 15




