Questions tagged [cookie-path]
16 questions
10
votes
2 answers
JQuery cookie extension will set a cookie with a path but will not read it
First, set a cookie:
jQuery.cookie('monster', 'big', { path : '/sesame/'});
Next, try to read it:
jQuery.cookie('monster');
Firefox tells me that the cookie has indeed been set. The value is big and the path is /sesame/. And yet when I tried to…

Manoj Govindan
- 72,339
- 21
- 134
- 141
7
votes
3 answers
How to set the AntiForgeryToken cookie path
The former HtmlHelper.AntiForgeryToken method which allows one to override the string path is deprecated.
[ObsoleteAttribute("This method is deprecated. Use the AntiForgeryToken() method instead. To specify a custom domain for the generated cookie,…

felickz
- 4,292
- 3
- 33
- 37
6
votes
1 answer
Set Cookie Path JavaScript
I want the code below to set the path to root, I understand I have to set / as the path value however this is not my code and I am not familiar with Javascript!
function setCookie(name, value, expires, path, domain, secure){
document.cookie= name +…

Harry
- 371
- 2
- 5
- 15
2
votes
0 answers
set absolute path for Cookie in Go
I set cookie on requests coming at test.mysite.com, the problem is the Path parameter on the cookie is set to /test instead of plain / and this is causing issues with recognizing the cookie on different parts of the website.
How can I set a cookie…

H.Yazdani
- 65
- 3
2
votes
1 answer
appending Hash fragment after the path in setcookie function PHP
I'm trying to set path in setcookie for my websites cookie, which contains a string followed by #wall , I could see path only till the first string, it's not accepting the # fraction of the path.
code goes like this:
$wall = array(
…

Thribhuvan HRz
- 33
- 6
2
votes
2 answers
How to change Grails Spring Security Cookie Path
I've got two grails applications using spring security:
Core
Module (user and role tables mapping to Core db tables)
I want to have a single sign on functionality using "remember me". The problem is that the cookies are stored in different paths…

user2282510
- 21
- 2
1
vote
1 answer
Asp.Net Application cookie path setup
I have to set a cookie path attribute in the asp.net application. I am getting "" only path if I changed the session state .Please help me to how to change cookie path in the asp.net application
//web config
//global asax
protected void…

Ganesha Moorthy
- 21
- 2
1
vote
0 answers
How to scope asp.net cookie to default page only
I am trying to set the scope of a cookie for only the default web page on my web application using the HttpCookie.Domain and HttpCookie.Path. The page is named "default.aspx". Problem is, it is set as the default web page so the user goes to…

stymie2
- 101
- 10
1
vote
1 answer
Can you specify multiple cookie paths?
I'm developing in PeopleSoft and the you access the PIA portal through a URL such as https://mywebserver.com/psp/ps/EMPLOYEE/CRM/?cmd=login. However, at some integration points, it will go through the non-portal URL…

Jliu
- 21
- 1
- 3
1
vote
2 answers
How can I limit a cookie to "/admin" on my domain?
How can I make the cookie session.cookie_path only available for the module "/admin/"?
Zend Framework Code:
// Se Login?
public static function isLoggedIn() {
$namespace = new Zend_Session_Namespace('Zend_Auth');
…

Navegante
- 43
- 4
1
vote
0 answers
How can i set the cookie with path in IE9
I am trying to set the cookie with path and it is working all browsers except IE.
The code which i am using is
$.cookie("selections",sids,{path:'/sme-ist'});
This is working in all browsers except in IE.
I was able to set the cookie without the…

Rajesh
- 11
- 1
0
votes
1 answer
How can we set path attribute for cookies in web.config file for .net web application
I need to set cookies path to my application directory so that cookies should not be shared across other domain/sub domain.
How can i set cookies path in the web.config file?
At present i have below configuration-

Debugmode
- 93
- 1
- 7
- 15
0
votes
1 answer
How to set path for authentication cookie
In ASP.NET Core 6 MVC multi-tenant application tenants have different path base like /tenant1 and /tenant2.
Middleware sets HttpContext PathBase from request url.
SignInAsync method always sets authentication cookie path to the root path /.
I'm…

Andrus
- 26,339
- 60
- 204
- 378
0
votes
0 answers
Issue with Cookie Security: Overlay Broad Path
I've two applications with a common domain name i.e let's say www.kishore.com/travelSite and www.kishore.com/researchSite.
So, in the travelSite I'm creating a cookie as below
Cookie cookie = new…

Kishore Kumar Korada
- 1,204
- 6
- 22
- 47
0
votes
1 answer
Cookie not available in different directory
According to MDN, cookies set with a path of '/' are available anywhere in the same domain. This is corroborated by several different sources.
However, I just haven't found this to be the case. I ran the following test on (nonexistent) directories…

jyn
- 463
- 4
- 16