Linked Questions
65 questions linked to/from Cookies on localhost with explicit domain
4 votes
3 answers
3k views
Can't access existing php cookie [duplicate]
I'm developing a website on my localhost which uses cookies. I have a function that generates a random, 25 character string which will be stored in a database and set as a referential cookie on the ...
-7 votes
2 answers
2k views
Do cookies work on a localhost? [duplicate]
Possible Duplicate: Cookies on localhost with explicit domain this is my code after the user has logged in: setcookie("user",$entered_username, time()+(60*60*5)); setcookie("password",$...
0 votes
1 answer
723 views
php setcookie isn't setting the cookie [duplicate]
I have an application that uses saml authentication and passes the response back via a cookie to the return URL the SP provides. The php code looks like this setcookie('auth', $cred, time() + 30, ...
1 vote
2 answers
261 views
Setting two sessions, a session and cookie [duplicate]
I'm trying to set a session and a cookie for when user logs in. When the user visits the login page, a session is set and started, with session_start() which is working quite alright, but when the ...
592 votes
25 answers
463k views
Detect when a browser receives a file download
I have a page that allows the user to download a dynamically-generated file. It takes a long time to generate, so I'd like to show a "waiting" indicator. The problem is, I can't figure out ...
391 votes
12 answers
413k views
Why is jQuery's .ajax() method not sending my session cookie?
After logging in via $.ajax() to a site, I am trying to send a second $.ajax() request to that site - but when I check the headers sent using FireBug, there is no session cookie being included in the ...
286 votes
16 answers
361k views
Set cookies for cross origin requests
How to share cookies cross origin? More specifically, how to use the Set-Cookie header in combination with the header Access-Control-Allow-Origin? Here's an explanation of my situation: I am ...
136 votes
4 answers
322k views
Creating a JavaScript cookie on a domain and reading it across sub domains
Below is a JavaScript cookie that is written on the user's computer for 12 months. After we set the cookie on our main domain such as example.com, should the user visit a subdomain like test.example....
77 votes
14 answers
173k views
Chrome localhost cookie not being set
I have an ASP.net application that uses a cookie to store the user selected language. Everything works fine except when I'm on localhost. Replacing localhost by 127.0.0.1 makes it work again... why? ...
145 votes
4 answers
86k views
What does the dot prefix in the cookie domain mean?
What is the difference between local.test.com and .local.test.com ? The screenshot is from Chrome.
81 votes
6 answers
117k views
Javascript document.cookie always returns empty string
I have this real strange problem with client side javascript setting cookies. I'm developing a little 1 page demo at the moment to use cookies to store some 'preferences'. Please note that I can't use ...
51 votes
10 answers
47k views
How to tell why a cookie is not being sent?
I'm using chrome and I'm wondering if there is either an extension or a method to tell why a cookie is not being sent. I have one request I'm making to http://dev/login and it's returning, Set-...
47 votes
3 answers
36k views
Why won't asp.net create cookies in localhost?
Okay, this is really kinda starting to bug me. I have a simple Web project setup located at: "C:\Projects\MyTestProject\". In IIS on my machine, I have mapped a virtual directory to this location so ...
35 votes
12 answers
5k views
Hiding an element on all site pages
I've developed a couple of alert boxes that display on all site pages. The user is able to close each box separately: $(document).ready(function() { $("#close-alert-box-news").click(function()...
18 votes
7 answers
71k views
Add cookies in playwright test
No matter what I do I get an error (either X.cookies is not a function or X.addCookies is not a function). I tried with context, page.context. browserContext etc. and it always ends up in the same way ...