cookies

Cookies on localhost with explicit domain

I must be missing some basic thing about cookies. On localhost, when I set a cookie on server side and specify the domain explicitly as localhost (or .localhost). the cookie does not seem to be accepted by some browsers. Firefox 3.5: I checked the HTTP request in Firebug. What I see is: Set-Cookie: name=value; domain=localhost;...

It's possible to share a cookie between 'some' subdomains?

I've been reading some posts about web performance, one of the points is to serve static content from a cookie-free domain, my question is: Can I share cookies between, let's say example.com and www.example.com, while excluding static1.example.com, static2.example.com, etc? Or do I need to set a different top level domain? I know (or ...

handling a comma inside a cookie value using .net's (C#) System.Net.Cookie

I'm creating a client to visit a website and log in + do some tasks automatically, however they recently updated their cookies to (for whatever reason...) contain a comma inside their identification cookie. So for example, the Cookie will have a value similar to this: a,bcdefghijklmnop The problem is, according to msdn you can't use...

C#, getting cookies with different names

Hi, I set cookies based on the referral links and they all start with the same letters, lets say "google", but they end with _xxx, _yyy, _zzz or whatever is the reference. Now, when I try to get the cookies later, I have the problem that I don't want to check for all of the different cookies, I would like to check for all cookies that s...

PHP Cookie Security Question

I have the following code that is presenting a 'word-of-the-day', As I am relatively new to php coding, I wanted to make sure that there weren't any security issues for how I am selecting from my database from the cookie value. Thanks. if ($word_of_the_day) { $wotd = $wpdb->get_results("SELECT term,definition FROM glossary WHERE ter...

Java Servlet/JSP Cookie Disconnect

Hey guys. I'm having a strange issue with cookie visibility between an authentication servlet and our actual jsp. We're using a servlet to authenticate that the user is a valid user, and if they are, we go ahead and add a cookie to the HttpServletResponse with their referer url (this is so that integrations can be redirected to their ow...

How can I use cookies for authentication in CakePHP?

Hi, I am trying to use a cookie that is set by other page in my domain to authenticate the user. Say I have needpassword.example.com written using cakephp, and the cookie is generated by auth.example.com (using a Perl CGI program). To login in to needpassword.example.com, I need to redirect to auth.example.com to set the cookie, and th...

Set session for different domains from the same server?

Does anyone know whether I can set a session value for the current domain, and use this session for another domain? For example: when I set session in domain www.aabc.com and I wish this session to work in domain www.ccc.com as well -- I click a button in www.aabc.com and change the header to www.ccc.com? ...

How do I find out if a user has cookies disabled in ASP.NET

I need to display a message if the user has cookies disabled. How would I go about doing this? ...

What's the accepted techniques for staying logged on to a web site ?

Most web sites you can log on to also provide the feature so it remembers you between sessions. What's the accepted and secure techniques for implementing that ? (What do you put in the cookies and how do you handle it on the server/db?) ...

JavaScript Cookie returns null values in IE6 Only

I have a page where I grab a value from the query string and add it into a cookie. The value is used for a couple of different items on the page. If the user returns to the page and the value isn't in the query string, the value is pulled back from the cookie. I have tried doing my own cookie setting and retrieval in JavaScript as well...

Safari doesn't set Cookie but IE / FF does.

Hi all, I found a strange cookie problem on safari. If you surf to http://2much.ch you can enter with FF/IE and surf inside the site. But if you use safari, you can enter only once; you can't surf inside the site. I found that Safari doesn't set the entered cookie, but FF/IE does. What is wrong here? ...

JSESSIONID collision between two servers on same ip but different ports

I've got a situation where I have two different webapps running on a single server, using different ports. They're both running Java's Jetty servlet container, so they both use a cookie parameter named JSESSIONID to track the session id. These two webapps are fighting over the session id. Open a Firefox tab, and go to WebApp1 WebApp1's...

problem with mediawiki cookies

anytime a user logs into our Wiki they get the following error: "This Wiki uses cookies to log in users. You have cookies disabled. Please enable them and try again." Even though the error displays, the user is actually logged in and can make edits as normal. If the user doesn't look closely they can't tell they are logged in and it's ca...

Find out the expiry date of cookie using javascript

Hi, I use functions for creating and reading cookies from quirksmode.org/js/cookies.html. I set also days to expire. I would like to find out cookie's expiry date ... so I can tell visitor how many days he/she must wait until something is possible again == until cookie is automatically erased. thanks thanks ...

How do I parse a variable or multi value cookie in Selenium?

I am trying to parse a multi-value cookie using the Selenium IDE. I have this as my Tracking Cookie Value: G=1&GS=2&UXD=MY8675309=&CC=234&SC=3535&CIC=2724624 So far I have simply captured the full cookie into a Selenium variable with the standard StoreCookieByName command: storeCookieByName Tracking Tracking However I w...

Apache / PHP Disable Cookies for Subdomain ?

Hi There, I am trying to follow these guidelines (http://developer.yahoo.com/performance/rules.html#cookie_free) to make my page load quicker, I have created a static subdomain to load static content from, however it is advising me to not have cookies sent on this subdomain, any ideas on how I might be able to do this in apache / php ? ...

Save div height in a cookie from jQuery resizable

Hi, I am using jQuery resizable from interface.eyecon.ro/docs/resizable for a menu on a page that I am working on. I need to set a cookie ( plugins.jquery.com/project/Cookie ) to store the height of the menu div so that the div doesn't resize to it's original css height on every page reload. I've been trying to adapt the code from http...

efficency of storing data in cookies

On my non membership site I would might like to keep track of what songs a user last listened to via Cookies The maximum number of values in this cookie would be maybe 100 values. The IDs of the songs: (30,31,32,32,34....... and on and on.) Is there any reason not to do this? Users are not authenticated in anyway. And this is non ess...

Strange Javascript/cross site cookies problem

I've got a PHP script running on domain B that, when called generates some JS. The idea is that in a given html page I can have: <script src="http://b.domain/myscript.php"&gt;&lt;/script&gt; So when the page loads, the script is called and the JS is generated and run on the local page. The problem is that myscript.php depends on B's...