cookies

Clearing Cookies not working? Setting expire date method.

I'm calling the following code: protected void SetCookieValue( string sCookieName, object oValue, DateTime dtExpires) { Response.Cookies[sCookieName].Value = Utility.ToStringValue(oValue); Response.Cookies[sCookieName].Expires = dtExpires; Response.Cookies.Add(Response.Cookies[sCookieName]); } With a date set to 30 day...

how to use variable in setcookie()?

I want to pass a variable set by the user to the setcookie function. I would like to let user change the color of some parts of website. so far the information about color is sent to server with $_SESSION['colorcode'] and I would like to add it to setcookie as well so when the user logs in to the site next time, his/her color is there. ...

Can't delete a cookie on test server

I am having a problem deleting a cookie on my test server. On my dev machine the cookie deletes fine. This is the request/response taken from fiddler. I'm trying to delete the .Hv2 cookie I've tried without setting the path part of the response cookie - no difference. This is a grab of how the cookie looks from FF. One difference I...

Javascript / PHP cookie serialization methods?

I have a form which I would like to store the values of in a cookie so the user doesn't have to re-enter the form every visit. (The form is a few selects to filter search results.) I would like for the cookie serialization to easily be readable from javascript (obviously to set the form onLoad), but I'd also like to be able to read the ...

Is it possible to programmatically remove cookies for a domain in Cocoa/iPhone

Basically I make a request to a server using NSURLRequest, like: GET www.example.com/blah The response from the server tells the browser to set some cookies. I need these cookies to make subsequent requests to www.example.com/blah2 and blah3, etc. Once I have completed the series of sequential requests I need to rerun them, except I wa...

How to tamper cookie.

Dear All, I just wanted to know how to tamper cookie(just for knowledge purpose :-)).I have created one application and tried to tamper the cookie but its not working. Code: protected void Button1_Click(object sender, EventArgs e) { if (Request.Cookies["myCookie"] != null) { Response.Redirect("Default2.as...

asp-classic Request.Cookies brings this value "ϑ" for 1 cookie instead of "ÅÙÏ‘‹„‰Š„‹"

This is happening in one cookie with keys in one key only. The value should be "ÅÙÏ‘‹„‰Š„‹". ...

Login/session cookies, Ajax and security

Hello, I'm trying to determine the most secure method for an ajax based login form to authenticate and set a client side cookie. I've seen things about XSS attacks such as this: http://stackoverflow.com/questions/27972/are-httponly-cookies-a-viable-option-for-an-ajax-website and http://www.codinghorror.com/blog/archives/001167.html ...

Javascript Cookie onload Call

I have a cookie that I did using javascript and to check if it had to be replaced I used "onload=checkCookie()" in the body tag of the HTML, however now I'm trying to place the js in another file and just link it using the tag, but if I do that I can no longer call this function using just "onload" so I was wondering how can I do this? ...

Firefox addon to remove cache and cookies of one domain?

I use Firefox to develop a web site and at the same time to browse the web, read my gmail, etc. The problem is every now and then I need to delete the cache and or remove the cookies of the web app, but I want to stayed logged in in the other web pages I am visiting. Do you know a Firefox plugin (or Firefox trick) that can help with th...

Using cookies to synch online and offline applications

I am working on an application that will have online and offline components and would like to get some opinions on how I am planning to do this. Feel free to give me some tough love if this is a ridiculous idea as I would like to learn as much as possible with this :o) Here are is an outline for what I am trying to accomplish... Clie...

Need to set cookie header on AIR use of SWFLoader to retrieve remote Flex .swf file

Am coding an AIR 1.5 app in which I want to do a remote load of a Flex .swf file from a web server. I'm using Flex 3.2 SDK and attempting to use the sub-application feature via SWFLoader. I've been referencing the Developing and loading sub-applications document on how to do this. I can indeed successfully load the Flex .swf file from ...

Mac Safari randomly recreating cookie when I refresh my login screen. Very bizarre

We have found an issue in our app where Safari on the Mac randomly recreates a login cookie from a logged off session. I have a fiddler archive with this behaviour here. Note that some stuff has been removed from this to make it easier to get, but nothing which sets a cookie or anything has been taken out - only repetitions of requests...

How to set a cookie on a separate domain in Rails.

How can you set a cookie on a different Domain that is calling my site with a javascript call? It works in FF3, but not in IE6. My server is called from a javascript tag on a seperate site and domain. The result returns javascript that populates their page with data (it's a widget). I am trying to set a cookie using domain=".mydomain....

How do I make an http request using cookies on Android?

I'd like to make an http request to a remote server while properly handling cookies (eg. storing cookies sent by the server, and sending those cookies when I make subsequent requests). It'd be nice to preserve any and all cookies, but really the only one I care about is the session cookie. With java.net, it appears that the preferred w...

Setting cookie in javabean getter

I am using Stripes but i'm not sure if this problem is because of that. I have an actionBean with a setter method setSearchView. In this setter, I set a cookie. The problem I'm seeing is that if i call that method from my jsp, the cookie does not get set (i have debugged the code and it does go through the code). If i call the same s...

How can Hulu.com keep track of your position in a tv show?

I'm watching a tv show on Hulu.com (which is btw, the absolute best streaming-video site around) and whether I close my browser, disconnect from the internet, and even if I restart my computer in the middle of watching a show, the next time I go to their site, I can resume the tv from exactly the time where I left off in the show. My qu...

Session not present when restarting browser

I login in my system and set a cookie this way: setcookie("hello",true,time()+3600); Then I look in the cookie manager of firefox and see that my cookie is set. When I restart my browser and restart I see in the cookie manager that the cookie is ther but this code: if(isset($_COOKIE['hello'])){ echo "yes"; exit;} I don't...

Remove a cookie

When I want to remove a Cookie I try unset($_COOKIE['hello']); I see in my cookie browser from firefox that the cookie still exists. How can I really remove the cookie? ...

Combining cookies and sessions

This question Is a result of various questions I had today about cookies. As you know it's not save to handle the login process with cookies. But how can I set a cookie when I am logged in and to be automatically loggedon when I restart my browser? If I redirect based on the existense of the cookie this is dangerous as someone els...