cookies

How to set/unset cookie with jQuery?

How to set a cookie named 'test' and value '1'? EDIT especially,how to unset? ...

How do i set cookie in the request while invoking a java webservice from a windows application using c#

How do i set cookie in the request while invoking a java webservice from a windows application using c#. I want to pass the JSESSIONID as cookie in the HttpHeader while invoking a java webservice. I have the JSESSIONID with me. I want to know how to create a cookie and pass the same in the request. Could someone suggest me. Is it feasib...

After a few window.open calls my ASP.NET session times out

I have an ASP.NET application that uses StateServer session mode with cookieless set to false. In a few places, there is a link that pops up a window to another application (which happens to reside on the same domain, but in a different virtual directory). The following steps give me grief... Launch popup Close popup Launch popup to ...

Session hijacking or attack?

Lately I have seen this in my error log (1 per day, and I have 40k visitors per day): [22-Sep-2009 21:13:52] PHP Warning: session_start() [function.session-start]: The session id contains illegal characters, valid characters are a-z, A-Z, 0-9 and '-,' in /var/my_files/class.session.php on line 67 [22-Sep-2009 21:13:52] PHP Warning: Unk...

Cookies on a remote site with IE

Hi all, We’re generating a video and pushing it to our client's web site. You can see it here, as an example: http://www.expresspassport.com/ We're calling the code by a remote JavaScript file that injects a few DOM elements. We're also setting a cookie to handle repeat visitors in a different behavior then new visitors. Up until a...

Share cookies between sessions in IE7

Hello All, I'm trying to get IE7 to share its cookies between sessions. I found that if i set the expiration date, it will share the cookies. However, i can't use this method because i am trying to control login to my application (users may only login once). Is there another way to get IE7 to share? Thanks ...

Testing for cookie existence in Django

Simple stuff here... if I try to reference a cookie in Django via request.COOKIE["key"] if the cookie doesn't exist that will throw a key error. For Django's GET and POST, since they are QueryDict objects, I can just do if "foo" in request.GET which is wonderfully sophisticated... what's the closest thing to this for cookies tha...

Scream of the day - Javascript serialising arrays in different ways...

This is royally annoying me at the moment: Consider an array of 2 values: var myArray = new Array(); myArray.push(21031); myArray.push(21486); When storing this in a cookie using jquery and toJSON, the value of the cookie looks like this: ["21031","21486"] Now consider an array of a single value: var myArray = new Array(); myArra...

Share session data between sites?

Hi, i'm working on multisite and I'd like to share session data between two or more sites. I have session id, but what is the best way to retrieve session data from cookie store? Or it will be better to enable ActiveRecord session store and use find_by_session_id method to retrieve session data? Using this way - I need to configure one s...

Difference between CookieStore Sessions and Encrypted Cookies in Ruby On Rails

I was wondering whether there is any difference between a session and an encrypted cookie (configured to expire as the session cookie does). Aren't they the exact same thing? Or Rails provides extra security for sessions? ...

Why not use Cookies for Authentication instead of sessions?

I would like to persist the user authentication between user sessions (basically a "remind me" by default). Sessions expire while cookies persist: why should I use a session for authentication and then another different cookie for the "remind me"? Can't I simply store a cookie whith a token and use it for both authentication and persis...

How do I activate the chrome's cookie function on local files

I'm using the "jQuery Cookie Plugin" on my homepage but it doesn't work in only chrome. And I use only chrome too. help please ...

Using PHP, how do you store credentials in a cookie with basic authentication?

This seems simple, but I am stuck. I am trying to use basic authentication using an API. I can use curl from the command line, but I can't figure out how to convert this to PHP and cookies. Please help! ...

Is it safe to share md5(cookie, some_string) with a third party service?

Hi, I need my users to authenticate against a third party service with the same cookie the use with my website. Is it safe to share the md5(cookie, service_name) with the service, where service_name is a constant string that all the users will use. To authenticate against the service a js function will do the md5 of the cookie on the ...

when creating a cookie, how can I specify www and no www cookie?

when I create a cookie for a domain, is it possible for me to set that this domain should be on both the www and non www domain? I check for a cookie, and if not present I rediret to login page (its not a super secure thing). it seems when the user has a cookie, if the url changes to www. it gets redirected to login again. ...

How to implement cookie support in ruby net/http?

Hello, I'd like to add cookie support to a ruby class utilizing net/http to browse the web. Cookies have to be stored in a file to survive after the script has ended. Of course I can read the specs and write some kind of a handler, use some cookie.txt format and so on, but it seems to mean reinventing the wheel. Is there a better way to ...

Javascript Cookie Timeout With Countdown Timer

I want to set a cookie with javascript. Easy enough. Lets say I set it for 15 minutes. How would I make a count down timer show to show when the cookie expires? And even if they left the page I would want it to keep counting and when they come back to the page it would still have been counting down. Sorry for the poor explanation. But ...

Mapping Asp.net cookies to users.

If one has access to both the Asp.net membership DB (the standard SqlMembershipProvider db, generated with aspnet_regsql.exe), and the respective asp.net client's cookies, is it possible to correlate the two to identify the user from the cookies? Background (in case this seems like a hacking attempt!): We have a web application that ma...

Retrieving cookies

I was wondering how I could retrieve a cookie that has a path specified - something like path=/foo/bar... If I use document.cookie that only retrieves me JSessionId cookie.. which I guess is the only one with path=/. ...

Implementing "Remember me" Functionality in ASP.NET

What is the best way to implement 'remember me' functionality on an ASP.NET web site? Should I use custom cookies or is there a simpler method? ...