cookies

What does this change I'm seeing in this cURL HTTP POST cookie response indicate?

Hi, I'm using cURL and php to query an exchange server that has Forms Based Authentication turned on. Due to FBA being on I need to collect a user's cookie authentication ids first. Yesterday everything was working: then something changed overnight and stopped working. I noticed that the cookie ids I was getting back were different (not ...

How does the CGI cookie work in Ruby?

Hey, This is the example I keep seeing online as how to set cookies. require "cgi" cookie = CGI::Cookie.new("rubyweb", "CustID=123", "Part=ABC"); cgi = CGI.new("html3") cgi.out( "cookie" => [cookie] ){ cgi.html{ "\nHTML content here" } } I tried doing it this way and it sets the cookie and then comes up with a blank page. #...

switch body background using jquery?

i want to make a body background switcher using jquery. you will have some buttons and each will change the body bg according to your choice. and i want to make it so like that it will save a cookie so that it can retrieve user's choice when you change the page. first part i got it useing .addclass or .css but i am stuck on the svaing ...

jQuery UI, sortables and Cookie plugin with multiple lists.

I'm using jQuery UI sortable plugin with the cookie plugin to set and get the list of two sortable lists. I found this piece of code to set and get a cookie: http://www.shopdev.co.uk/blog/sortable-lists-using-jquery-ui/#comment-6441 It works as I want to for one list, but not two (I've made the changes listed in the comments but fail s...

Problem with sessions after ISP moved my site to new server

Hello, I'm having some sessions problems after my ISP moved my site to a new server, supposedly setup the same. The problem appears to be browser-specific as well, which I don't quite understand. First, my site uses sessions to login, this has been broken since they moved the site. My ISP has set up a test page at http://launchcomplex...

PHP: getting a "use of undefined constant COOKIE_LOGIN" how do I fix this?

Hello, I haven't made any changes to the code affecting the COOKIE's and now I get the following: Use of undefined constant COOKIE_LOGIN - assumed 'COOKIE_LOGIN' //Destroy Cookie if (isset($_COOKIE[COOKIE_LOGIN]) && !empty($_COOKIE[COOKIE_LOGIN])) setcookie(COOKIE_LOGIN,$objUserSerialized,time() - 86400 ); I'm not sure what I ne...

Should a web browser delete all `session' (expiry = 0) cookies on exit?

Everything I read about cookies says that setting the expiry time of a cookie to zero should make it a `session' cookie, which the browser will then delete upon exit. http://www.cookiecentral.com/faq/ says that : "...generally a session is the length of time that the browser is open for..." http://uk2.php.net/manual/en/function.se...

In a website with no users, are cookies the only way to prevent people from repeating actions?

I'm creating a website and I don't want to have user/membership. However, people using the site can do things like vote and flag questionable content. Is the only way to identify and prevent users from doing this repeatedly by using cookies? I realize a user can just clear their cookies but I can't think of another way. Suggestions f...

How, with jQuery do I tell if a website visitor has been to the site before?

I want create a div container with a message for first time visitors to my site. Visitors will read it and click a 'Hide' button to dissapear it forever. How is this done? ...

Mix XML Parents and Children in MSSQL

I think what I need is CROSS APPLY, but I can't seem to figure out the syntax. I have a set of XML in an MSSQL 2008 database that looks like this: <Cookie> <id>Chocolate Chip</id> <ChocolateChipPeanutButter> ... </ChocolateChipPeanutButter> <ChocolateChipPecan> ... </ChocolateChipPecan> </Cookie> <Cookie> ...

longest lasting cookie

I want to keep a user logged in as long as possible. What should I use? regular cookie persistent cookie flash cookie ip address session or some combination of these? ...

Thinking about scrapping my idea of writing a custom membership and roles provider. Opinions?

I've got a web app I'm building in ASP.NET that has the following security requirements: Must be able to integrate with a master authentication scheme that passes back a unique key to the application to indicate a user has logged in via a third-party site. Must be able to use existing user/roles tables. May use forms authentication and...

Performance asp.net and cookie

Writting an asp.net shopping cart. I am leveraging the session for state but I also want to store basic info in a cookie. This info would be the items / qty. I am aware of the cookie size limitations but here the question. Are there any sources of information on performance cost in terms of writting to a cookie as opposed to sql. In my ...

Storing custom user information in an authentication ticket instead of in Membership provider

I've been looking at implementing a custom SQL Server-based membership provider and one of my problems is that the membershipUserObject is keyed on a GUID. Since I'm using an existing ID as a key to roles and user data, this presents an interesting problem. I'd like your opinion on which option -- or whether there's another option I ha...

How to get HttpWebRequest.AllowAutoRedirect to set the cookies when doing a GET/POST on the redrected page?

Is there a way to get the HttpWebRequest object to take the set-cookie header into account when being automatically redirected to another page through the AllowAutoRedirect feature? I need it to maintain the cookie information across redirects; I'd rather not have to implement the redirect myself if the framework can do this for me. This...

Firefox session cookies

Generally speaking, when given a cookie that has no expiration period, modern browsers will consider this cookie to be a 'session cookie', they will remove the cookie at the end of the browsing session (generally when the browser instance closes). IE, Opera, Safari and Chrome all support this behavior. However firefox (3.0.9 latest pro...

Use jQuery to append star to menu item if the linked page's content has changed since last visit

I would like to create a similar effect to Apple's Safari 4 Beta Top Sites page - http://farm4.static.flickr.com/3644/3323438140_10b62d40f4.jpg ; when when you view it and a page's content has changed since you last visited, it displays a blue star in the top right hand corner to notify you. I would like to do the very same, but only w...

Can I make my ASP.NET FormsAuthentication cookie more secure by associating it with the session ID?

We've noticed that it's possible to recreate a copy of an ASP.NET FormsAuthentication cookie on another machine, allowing the second machine to authenticate without needing to log in. One suggested solution to this has been to store the session ID within FormsAuthenticationTicket.UserData and to check that the two values match inside Ap...

Lose ASP.NET Session for one request and then regains it on next

I am seeing a very strange problem on one of my production boxes. We have an application hosted in IIS 6 on a single machine with an apache web server in front of it. My application is using ASP.NET Membership for authentication and relies on session state. I am seeing a problem right now where some server requests will hit a null exce...

Internet Explorer ignores cookies on some domains (cannot read or set cookies)

I have a site, e.g. example.com, where users can set their own subdomains (one user - one subdomain) and upload their own scripts, e.g. http://somedomain.example.com/xyzzy.php would map to /www/somedomain/xyzzy.php Now, on some of those domains, Internet Explorer 7 won't/can't accept cookies. Checked with Fiddler: the server sends Set-C...