cookies

How does this Bookmarklet allow you to stay signed into this site?

Hello all, I have come across Evernote's bookmarklet and was wondering how this worked. You can just drag it to your bookmark and go to any webpage, click that bookmarklet and it will first ask you to login in. All this I have done already and know how it works. The bit that I don't understand is that when you log in they authenticate...

problem getting info from a cookie with javascript

I am having an issue with my cookies and I can't figure it out. Basically I have it set up so it checks for the cookie to see if the user is logged in, and then displays either a welcome message or a login link. It works - except that instead of returning the persons name in the welcome message it just is blank where the name should be. ...

Browser: Cookie lost on refresh

I am experiencing a strange behaviour of my application in Chrome browser (No problem with other browsers). When I refresh a page, the cookie is being sent properly, but intermittently the browser doesn't seem to pass the cookie on some refreshes. This is how I set my cookie: $identifier = / some weird string /; $key = md5(uniqid(rand(...

curl cookie not creating on success

Hi I'm using cUrl(PHP) to post a login request and store response in cookie file. In my second request I'm passing cookie in header and post data to verify it. Issue is that cookie file is not created in first succesful request results in failure for second request. Please suggest me where I'm doing wrong. $cookiefile="/var/www/html/di...

session problem in using WebRequest and WebResponse

i have created an application with the help of webrequest and webresponse . when i try to log in to yahoo i succeed. after that i open the next page and i get the login page again by the response. How can I fix this? ...

How to delete a large cookie that causes Apache to 400

I've come across an issue where a web application has managed to create a cookie on the client, which, when submitted by the client to Apache, causes Apache to return the following: HTTP/1.1 400 Bad Request Date: Mon, 08 Mar 2010 21:21:21 GMT Server: Apache/2.2.3 (Red Hat) Content-Length: 7274 Connection: close Content-Type: text/html; ...

Most secure way to generate a random session ID for a cookie?

I'm writing my own sessions controller that issues a unique id to a user once logged in, and then verifies and authenticates that unique id at every page load. What is the most secure way to generate such an id? Should the unique id be completely random? Is there any downside to including the user id as part of the unique id? ...

PHP HttpRequest Cookie Issue

I have a chunk of code to login to test a web site login: $r = new HttpRequest($newlocation, HttpRequest::METH_GET); $r->addCookies($cookieArray); $r->send(); The content of $cookieArray is from a redirect, but I don't modify it in any way. The really baked part is that if the value of the cookie (an authentication token string) contain...

Tomcat 6.0 doesn't set Cookies in webkit based browsers on localhost

I'm working on a website that runs on Tomcat 6.0 at localhost:8080. Interestingly enough, Tomcat seems to only be able to set cookies on Firefox. Opera and WebKit based browsers (Chrome, WinSafari) seem to fail. Is this a known issue and is there a solution? ...

Background login with OAuth

I'm soon to write a web based Twitter client which I plan to allow users to login with OAuth. My question is; can, once a user has logged in once already, my app login later and 'background' process their feed for them? I.E. does the user have to 'be there'? ...

chrome cookie size limit

Hi, I'm writing into a session cookie from my plugin in chrome. The browser seems to have a strict limit of 4kb for cookie size. It doesnt seem the case in firefox. Is there anyway i can increase the cookie size limit in chrome? Thanks ...

How to delete Firefox Cookies and cache while program runs on Selenium Grid

I am running Selenium Grid and most of my Scripts fails due to unable to delete FF cookies. Each testcase needs to delete browser cookies .If any one aware of this please let me know. ...

Reading cookies across different hosts

I have two sites - both are my projects. On site two, I need to check if the user is logged in on site one. I suppose to do this I should just create a script that puts a cookie into the body of an iframe and then read the iframe contents on site two. But I can't. Here is a code I made for testing purposes: http://jsbin.com/oqaza/edit ...

how to check from JavaScript if loaded page has ASP.NET authentication cookie?

It looks like JavaScript does not have access to authentication cookies ('ASP.NET_SessionId', '.ASPXFORMSAUTH') in the http headers I can see cookies but document.cookie object does not have them. ...

how to manually add a cookie to Mechanize state?

[I'm working in Ruby, but my question is valid for other languages as well.] I have a Mechanize-driven application. The server I'm talking to sets a cookie using javascript (rather than standard set-cookie), so Mechanize doesn't catch the cookie. I need to pass that cookie back on the next GET request. The good news is that I alr...

Cookie is not getting deleted in IE 8.

Hello guys, I'm trying to delete a cookie but somehow it is not getting deleted in IE 8 This is the code i'm using HttpCookie userCookie = Request.Cookies[cookieName]; if (userCookie != null) { userCookie.Expires = DateTime.Now.AddDays(-1); if (!string.IsNullOrEmpty(cookieDomain...

Programmatically Detecting Browser Cookies Enable/Disabled without Redirect or Javascript?

How is http://supportdetails.com detecting if cookies are enabled or disabled without a server side redirect? Using Firefox and the Developer plug I've disabled Javascript and toggled Cookies on and off. It correctly detects without, as far as I can tell, a server side redirect. How are they doing this? ...

Dynamically manipulate php cookies with javascript/jquery

Hi guys, I'm currently building a dynamic menu bar(vertical and horizontal). in the default position its vertical. the user have the option to show the horizontal position and hide and vertical. I am currently doing that with javascript/ jquery. in order to keep the menu bar in the horizontal position i am keeping a count with a cookie....

App session cookie not being created in Rails, sporadically

Hi everyone, This is an issue sporadically for very few users, however we haven't been able to replicate it. However I have now got a Chrome instance (Mac) which is reproducing the error (for some unknown reason), and I hope to not restart it until I have this nailed! Rails application, using memcached for session store. While the bug ...

Simple App Engine Sessions Implementation

Here is a very basic class for handling sessions on App Engine: """Lightweight implementation of cookie-based sessions for Google App Engine. Classes: Session """ import os import random import Cookie from google.appengine.api import memcache _COOKIE_NAME = 'app-sid' _COOKIE_PATH = '/' _SESSION_EXPIRE_TIME = 180 * 60 class Session...