Revisit Understanding of Cookies
satya - 6/24/2017, 9:42:56 AM
Research on http digest and persistent logins inorder to extend akc logins
Research on http digest and persistent logins inorder to extend akc logins
This covers cookies in the context of implementing persistent logins. This URL will also lead to other URLs that are related to persistent logins.
satya - 6/24/2017, 9:43:16 AM
Persistent Cookies and path specification
Persistent Cookies and path specification
satya - 6/24/2017, 9:45:28 AM
PERSISTENT CLIENT STATE HTTP COOKIES
satya - 6/24/2017, 9:46:16 AM
On Path
The path attribute is used to specify the subset of URLs in a domain for which the cookie is valid. If a cookie has already passed domain matching, then the pathname component of the URL is compared with the path attribute, and if there is a match, the cookie is considered valid and is sent along with the URL request. The path "/foo" would match "/foobar" and "/foo/bar.html". The path "/" is the most general path.
If the path is not specified, it as assumed to be the same path as the document being described by the header which contains the cookie.
satya - 6/24/2017, 9:48:07 AM
How do I see and manager cookies in chrome browser
How do I see and manager cookies in chrome browser
Search for: How do I see and manager cookies in chrome browser
satya - 6/24/2017, 9:54:21 AM
How can I see cookies for a given site in chrome?
How can I see cookies for a given site in chrome?
Search for: How can I see cookies for a given site in chrome?
satya - 6/24/2017, 9:57:02 AM
Setting the root path on a cookie
Setting the root path on a cookie
satya - 6/24/2017, 10:03:40 AM
How can I pinpoint cookies for a particular website in chrome?
How can I pinpoint cookies for a particular website in chrome?
Search for: How can I pinpoint cookies for a particular website in chrome?
satya - 6/24/2017, 10:09:52 AM
First approach
Settings
Search for "cookies"
(use the search field on that page)
Content Settings
All cookies and site data
(use the search field to type your domain name)
(or cookie name)
satya - 6/24/2017, 10:10:58 AM
Second approach
Settings
Go to the bottom
Advanced settings
Privacy settings
Content Settings
All cookies and site data
(use the search field to type your domain name)
(or cookie name)
satya - 6/24/2017, 10:12:53 AM
You can see something like this for your cookie
Name: cookie-name
Content: "cookie-value"
Domain: www.satyakomatineni.com
Path: /akc/servlet
Send for: Any kind of connection
Accessible to script: Yes
Created: Saturday, June 24, 2017 at 9:21:08 AM
Expires: Friday, September 22, 2017 at 9:21:08 AM
satya - 6/24/2017, 11:27:27 AM
Java cookie setpath root
Java cookie setpath root
satya - 6/24/2017, 11:39:23 AM
cookie.setpath from a java servlet?
cookie.setpath from a java servlet?
satya - 6/24/2017, 5:04:28 PM
Yes setting the cookies path to root path does work on the servlet api
Make sure your cookie name and the path are the same when you manipulate that cookie
satya - 6/24/2017, 5:09:52 PM
An example
public static Cookie createPersistentPLSCookie(String value)
{
Cookie pc = new Cookie(RLK_COOKIE_NAME, value);
pc.setPath("/");
return pc;
}
See how the name and path are fixed.
satya - 6/24/2017, 5:10:04 PM
Here is how you cancel that cookie
public static Cookie createPersistentPLSCancelCookie()
{
//path is set
Cookie pc = createPersistentPLSCookie("");
//set cancellation
pc.setMaxAge(0);
return pc;
}
satya - 6/24/2017, 5:10:51 PM
Then you will see in chrome
Name: cookie-name
Content: "cookie-value"
Domain: www.satyakomatineni.com
Path: /
Send for: Any kind of connection
Accessible to script: Yes
Created: Saturday, June 24, 2017 at 9:21:08 AM
Expires: Friday, September 22, 2017 at 9:21:08 AM
satya - 7/3/2017, 10:02:40 AM
Better way to get to to cookies in Chrome
//Reach the cookies control panel
chrome://settings/content/cookies
//For a specific site
chrome://settings/cookies/detail?site=your-site-url.com
satya - 7/3/2017, 10:03:58 AM
Chrome can change the layout of the settings screens in your browser
So old documentation on how to get cookies may vary if you go through their UI. The URL to get to the cookies may be more stable.