Sign up or Sign in | Share
 
ClearMyBench
Welcome, Guest
Please Login or Register.    Lost Password?
Re:Ruby concepts part 2 (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:Ruby concepts part 2
#4690
ShriNi (User)
Software Techie (PEGA) currently on a Career Break
Platinum Boarder
Posts: 4000
graph
User Offline Click here to see the profile of this user
Gender: Female Location: Secundrabad India Birthdate: 1983-09-29
Re:Ruby concepts part 2 3 Years, 10 Months ago Karma: 0  
Now, when the visitor arrives at another page on our site, the cookie is available for retrieval.


Once retrieved, our server knows/remembers what was stored
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4691
ShriNi (User)
Software Techie (PEGA) currently on a Career Break
Platinum Boarder
Posts: 4000
graph
User Offline Click here to see the profile of this user
Gender: Female Location: Secundrabad India Birthdate: 1983-09-29
Re:Ruby concepts part 2 3 Years, 10 Months ago Karma: 0  
Cookies are a plain text data record of 5 variable-length fields:

1. Expires :

The date the cookie will expire. If this is blank, the cookie will expire when the visitor quits the browser.

2. Domain :

The domain name of your site.

3. Path :

The path to the directory or web page that set the cookie.

This may be blank if you want to retrieve the cookie from any directory or page.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4692
ShriNi (User)
Software Techie (PEGA) currently on a Career Break
Platinum Boarder
Posts: 4000
graph
User Offline Click here to see the profile of this user
Gender: Female Location: Secundrabad India Birthdate: 1983-09-29
Re:Ruby concepts part 2 3 Years, 10 Months ago Karma: 0  
4. Secure :

If this field contains the word "secure" then the cookie may only be retrieved with a secure server.

If this field is blank, no such restriction exists.

5. Name=Value : Cookies are set and retrviewed in the form of key and value pairs.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4693
ShriNi (User)
Software Techie (PEGA) currently on a Career Break
Platinum Boarder
Posts: 4000
graph
User Offline Click here to see the profile of this user
Gender: Female Location: Secundrabad India Birthdate: 1983-09-29
Re:Ruby concepts part 2 3 Years, 10 Months ago Karma: 0  
Handling Cookies in Ruby

We can create a named cookie object and store a any textual information in it.


To send it down to the browser, set a cookie header in the call to CGI.out
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4694
ShriNi (User)
Software Techie (PEGA) currently on a Career Break
Platinum Boarder
Posts: 4000
graph
User Offline Click here to see the profile of this user
Gender: Female Location: Secundrabad India Birthdate: 1983-09-29
Re:Ruby concepts part 2 3 Years, 10 Months ago Karma: 0  
Cookies are represented using a separate object of class CGI::Cookie.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4695
ShriNi (User)
Software Techie (PEGA) currently on a Career Break
Platinum Boarder
Posts: 4000
graph
User Offline Click here to see the profile of this user
Gender: Female Location: Secundrabad India Birthdate: 1983-09-29
Re:Ruby concepts part 2 3 Years, 10 Months ago Karma: 0  
A CGI:ession maintains a persistent state for Web users in a CGI environment.

Sessions should be closed after use, as this ensures that their data is written out to the store
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
get the latest posts directly to your desktop
logo footer   Copyright 2009 - 2013 HotRecruiter.Com - All Rights Reserved