cookies

How to test cookies state in functional tests in Rails?

How do I test a given controller action that uses cookies? How to set cookies in functional tests and how to get them? ...

How to print the value of text box dynamically

hi, I have text box called "userInput" and one submit button.I want to print the value of the text box which is entered by user like a stack(previous values also,not just the current value). any idea..?? <input type="text" name="userInput"/> <input type="button" name="sub" value="submit"> Thank in advance! ...

Detecting domain change for cookie deletion

A client is looking to play a brief splash javascript animation whenever a user accesses their site for either the first time or after visiting another domain. So as long as they are not navigating within the site. Essentially, I'm looking to set a cookie and delete it if they leave the domain or capture what's going on in the URL bar,...

Obtain Gmail cookie value

Hi, is there a way to obtain gmail's cookie value. Particularly I would like to know logged users email. ...

How do I manage cookies with HttpClient in Android and/or Java?

I am trying to login to a site and maintain that session/cookie so that the server will recognize my login, but I am struggling to figure out a way of extracting the cookie from the response and setting into a request to maintain my login. I'm wondering if I should go about taking the header "Set-Cookie" or using a CookieStore. Any help ...

How to read cookie that written in login method ?

If the login code int http://msdn.microsoft.com/en-us/library/system.web.security.formsauthenticationticket(v=VS.90).aspx we will found that they create cookie as below new HttpCookie(FormsAuthentication.FormsCookieName, encTicket) I want in another code to read this cookie and check it .. how can i do although i don't know the nam...

View counter ASP.NET MVC

I'm going to create a view counter for articles. I have some questions: Should I ignore article's author when he opens the article? I don't want to update database each time. I can store in a Dictionary<int, int> (articleId, viewCount) how many times each article was viewed. After 100 hits I can update the database. I should only coun...

WWW::Mechanize and Cookies

I use WWW::Mechanize::Shell to test stuff. Since I didn't managed to sign in on a web site I want to scrape, I thought I will use the browser cookie (chrome or firefox) for that specific website with the 'cookie' command WWW::Mechanize::Shell has. The question is, Cookies usually stored in a single file, which is not good, how to get a ...

How to make cookie-setting javascript cooperate with django.contrib.auth?

Hi I'm trying to make mathjax work in askbot Q&A forum. Got some decent results, but here is a strange issue: once I add some setting (a feature in mathjax that uses cookies) via right-clicking - django automatically logs me out. Is there a way to make django authentication not over-react to cookies set via javascript? Thanks. ...

How do I manually add more cookies to a session which already has cookies set in mechanize?

I have a python script which scrapes a page and receives a cookie. I want to append another cookie to the existing cookies that are being send to the server. So that on the next request I have the cookies from the original page plus ones I set manually. Anyway of doing this? I tried addheaders in mechanize but it was ignored. ...

problem with multiple cookies and HTTP::Headers

i'm having problems with the HTTP:Cookies extract_cookies() method, i have a HTTP::Header object with multiple cookies in it under a single field name and the method is only extracting a single cookie. The solution is possibly to have each cookie under a separate 'Set-Cookie" field, but from which i can see HTTP::Headers does not allow y...

cookie or localStorage with chrome extensions

I've read all the other q's here regarding the topic but couldn't solve my problem. I'm setting on my website the email of the user in the localStorage and i want to retrieve it in the extension. localStorage.setItem("user", "[email protected]" ); But when i try to receive it with the chrome extension it fails to do so value =...

Why Opera is using Firefox's Cookies

Hello, I have two open sessions on different browsers (Firefox, Opera). Both of them run on different user accounts. When I navigate through the administration page, the cookies are ok. But when I try to upload some images, the uploading php script receives the same cookies as in Firefox. This doesn't happen if I use Internet Explorer ...

How do I share cookies across 2 domains with javascript?

I want to be able to access and set cookies between example.com and mysite.com. How do I do that? ...

Session expire issue after deploying in virtual server

Hi, I have asp.net app which works fine with visual studio and also local IIS server deployment witout any issue with its session. but after deploying the code to server virtual server (IIS 6, windows 2003) it dosent work properly. Session gets null in subsequent requests and after few navigations in the site, and this issue is only oc...

$_COOKIE[] seems to not reflect change after setting it

I don't remember having many problems using Cookies in the past but I was playing around and encountered some unexpected results. (i'm running on localhost, hence my domain setting) <?php $sessionCookie = rand(); setcookie("crav_auto_login_cookie", $sessionCookie, false,"/crav/", false); echo "Cookie Set<br/>"; echo "Cookie equals: ".$...

Opening a website frame or image in python

So i am fairly fluent with python and have used urllib2 and Cookies a lot for website automation. I just stumbled upon the "webbrowser" module which can open a url in your default browser. Im wondering if its possible to select just one object from that url and open that up. Specifically i want to open a "captcha" so that the user can in...

Applet: problem with cookie encoding for jar request (Firefox - Iplanet)

I have an applet working with a JAR file. When the JVM sends the request to the webserver for the JAR file, it adds to the request the existing domain cookies. However, one of these cookie is encoded, and on Firefox with Iplanet (webserver), it prevents the jar from being downloaded (server returns error 400). Below the HTTP request (as...

How to save large amount of data within users browser?

I have been writing a php script that saves a long string within cookie (more than 4000 chars long) and I want to save it within the browser cache. The problem is that almost all browsers have a limit. What should I do? I'm using jQuery for adding and reading data from cookie and php. ...

Response.Cookies gets reset when RedirectToAction is called

IN my asp.net-mvc project I have an AccountController that upon logging in sets a cookie with user preferences to the Request.Response and then does a RedirectToAction. Upon redirecting, the cookies are reset so I loose my settings. The only solution I can come up with is adding the data from the cookie in the tempdata and then fetching...