cookies

Flash + pyAMF + Django session cookie security

First off, if there is a true, official way of having flash/flex's NetConnections usurp the session/cookie state of the surrounding web page, so that if the user has already logged in, they don't need to provide credentials again just to set up an AMF connection, please stop me now and post the official answer. Barring that, I'm assumin...

facebook app cookie not set to new session data when $_REQUEST session is present

My app authenticates just fine. The problem comes when a different user logs in to the same browser. The first page the new user lands everything is ok (the $_REQUEST parameters are still present in the iframes url). Once however they click on a link it reverts back to the cookie and it appears as though they are logged in as the previo...

How to serve different cached versions of a page depending on a cookie in Drupal?

The task is relatively straightforward: A Drupal website displays a list of articles with thumbnails. Some visitors would like to view it without images by clicking on a button/link and have that preference saved. e.g. http://patterntap.com/collections/index/ The problem is all visitors are anonymous and given certain traffic, page ...

When to use URL/session/cookie variables?

I do a lot of php and javascript, but I think this is relatively language-agnostic question. Are there any best-practices for when to use each of: URL variables SESSION variables cookies I understand the inherent limitations of what some of them can't do, but it seems like their use can overlap sometimes, too, and those instances ar...

InternetGetCookie does not retrieve all cookies

I am trying to use InternetGetCookie in order to retrieve cookies from IE. The problem I have is that sometimes in a cookie file there may be 2 or even 3 different cookies but InternetGetCookie always retrieves the data associated with only the first cookie. I tried calling InternetGetCookie twice in a row for the same cookie url but it...

Generating a new cookie and token

Im trying to design a login system, which when the user is logged will provide a token at the end of each URL, this will have to match the token stored in the cookie, once this is matched the value of the cookie is changed to the value of the current session. if (isset($_COOKIE['user_token']) && $_SESSION['user_token']) { if (isset(...

Generate a New Cookie for Each Request?

How can you generate a new cookie value, with each new request (e.g. the cookie value changes when you click on a hyperlink). An example would be something that PEAR AUTH does: "Each client request a special unique cookie is given to the client. He must present this cookie on his next request. This cookie changes on every request. If c...

Cookies in Javascript

I have a cookie "A" set at a domain at bc.test.com(all urls are changed to protect company info). I also have a cookie "B" set at a domain of .test.com. I also have a Javascript file hosted at bc.test.com/_include. Now, in my host file, I have setting to point bc.test.com to a development server. But now, when I try reading cookie "A...

Would this cookie system be secure for storeing passwords?

I'd like input on this cookie password storing security system, When the user ticks the remember me box, it stores these cookies: User name in plain text. Password encrypted with a completely random key that the server stores in the database, that is never passed to the client and is user-specific, changes with every login. And the se...

iPhone home screen bookmark & persistent cookie

When a webpage is bookmarked on the home screen of an iPhone, persistent cookies seem to get lost each time the app is opened. Is there a way to keep the cookies alive? ...

Can I get cookie only from second level domain?

There are two domains: a.example.com example.com example.com is the parent domain of a.example.com. Now both a.example.com and example.com may write a cookie named test_cookie. Now we have a page of a.example.com which will use javascript to read value of cookie test_cookie. Is there a way that only read the cookie set in the domain...

Reading cookie value in Rails

I successfully set a cookie in JavaScript: var date = new Date(); date.setTime(date.getTime()+(1*24*60*60*1000)); //one day expiration date var expires = "; expires="+date.toGMTString(); window.name = date.getTime(); document.cookie = "window_name="+window.name+expires+"; path=/"; Then in rails I try to read (I've tried both of the fo...

IE6 domain cookie limit of 20?

I've been trying to get to the bottom of this -- and was wondering if anyone can verify. Does IE6 still only support 20 domain cookies at this time? I've found some MS articles online that indicate the domain cookie limit was increased in 2007 to 50 -- but, it's unclear if the article is discussing IE7. ...

Read domain's cookie from subdomain with Rails

Hi, In order to store some Google Analytics data, I would like to access to GA "__utmz" domain's cookie (domain=.example.com) from my www subdomain (domain=www.example.com). Is it possible to read this domain's cookie from a subdomain ? If yes, how can I do that with Rails ? cookies[:__utmz] doesn't seem to work with all browsers. I k...

jquery cookies: a new cookie is created on each page?

I generate the jQuery cookie using this code: $.cookie('queueView', 'value', { path: '/' }); assuming that the path is set to the root, hence "/". When i go to a different page, and on a different folder level, the cookie is suddenly gone only to find out that it became unique to a particular web page in my site. What i would like to...

Google Friend Connect fcauth cookie in php

Hi folks, this may be easy for most of you .. but not me. I am using some "sample" Google code - as it fits my purpose so why change what works - but for the life of me I cannot access/find/get etc the FCAuth cookie after a user is logged in. Help please - thanks in advance. Here is my code (the Site ID is in a set variable, and all t...

How to remove unchecked check-box values from cookie using jQuery?

I'm trying to write a script where the unchecked values of a set of check-box are removed from a cookie. I am using jQuery's cookie plugin below is my current function which is called when a check-box is called; <script type="text/javascript"> jQuery(document).ready(function($){ $("input[type=checkbox]").each(function () { $(...

jQuery Toggle Cookie

I have the following code (Yes I know it's quite long winded, but I want to keep it as much the same as possible) Hopefully it will make sense, but essentially what I want to do is when a user clicks one of the toggles it will create the relevant cookie and set its value to "Open" and then when they click it again it remove the cookie. ...

Save/Read user data across different browsers

I have been trying to figure this out for a couple of days now. My machine is a mac with snow leopard installed. I listen to music on http://listen.grooveshark.com/ using firefox, and I do not have a user account with them. When I leave the site and come back using firefox, I get an option to restore the songs that I had added to my pl...

Crossdomain cookie in Opera browser

Hi all, I have few web application based on ASP. NET. Multiple sites authorization is used in there. If I logged on subdomain1.mysite.com, I logged on subdomain2.mysite.com aswell. I used for that the same machineKey configuration. forms section looks like that: <forms name=".ASPXFORMSAUTH" protection="All" path="/" timeout="43200" l...