It's not a secret anymore!
The moose likes HTML, CSS and JavaScript and the fly likes cookies using javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "cookies using javascript" Watch "cookies using javascript" New topic

cookies using javascript

Naresh Chaurasia
Ranch Hand

Joined: May 18, 2005
Posts: 361
i am using the following code in java script (document.kookie = 'kookiename=kookievalue' . Is it possible to define the life time of the cookies in javascript like we do while using cookie object in jsp/servlets

thnx in advance

N Chaurasia

SCJP 1.4, SCWCD1.4, OCA(1Z0-007)
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
A simple search on Google would answer this qustion. I would bet if you searched Google for JavaScript cookies, this link would show up.

I agree. Here's the link:
subject: cookies using javascript
It's not a secret anymore!