cookies

How to get jetty to send jsessionid-cookies with the secure-flag when using a secure channel

I am using Tomcat in my production environment and jetty in my testing environment (via jetty-maven-plugin). Tomcat sets the secure-flag on a jsessionid-cookie, when it is sendig it over a secure channel (https), which looks like a good idea to me, becaus it prevents the session from being exposed, when the user klicks on a http://-link...

Maintain cookie session in Android

Okay, I have an android application that has a form in it, two EditText, a spinner, and a login button. The user selects the service from the spinner, types in their user name and password, and clicks login. The data is sent via POST, a response is returned, it's handled, a new webview is launched, the html string generated from the resp...

jQuery if not exist

This means "if exist" if($.cookie("movies_list")) { // do something } How to write "if not exist" without changing the structure? ...

jQuery cookie control

How to create cookie, which will work on all pages over choosen site? Using cookie plugin. Code must add cookie "movie_check" with value "no", which can be used over all pages on site "www.site.com" (were script is implemented). Expires after 365 days. Tryed this (doesnt work): $.cookie("movie_check", "no", {expires: 365, domain: 'ww...

Flex Blaze DS not passing OpenSSO authentication cookie?

I have a set of RESTful web services. These services are protected on a Glassfish server by OpenSSO. When I attempt to call the RESTful services directly from a browser, OpenSSO intercepts the request, then forwards the request to the REST service once the user's credentials are authenticated. OpenSSO utilizes a session cookie on subs...

Java: Handling cookies when logging in with POST

I'm having quite some trouble logging in to any site in Java. I'm using the default URLconnection POST request, but I'm unsure how to handle the cookies properly. I tried this guide: http://www.hccp.org/java-net-cookie-how-to.html But couldn't get it working. I've been trying basically for days now, and I really need help if anyone wants...

CakePHP 1.3.0 Cookie Component destroy() then read() odd behavior

I found some interesting behavior with the CakePHP Cookie Component in my app today. It all started with a logout bug. My app was essentially allowing users to refresh the page and be re-logged-in if they had opted to "Remember me" (sets cookie). But it was only for that session. Next visit (new session), the bug would not appear - i.e. ...

Using PHPUnit to test cookies and sessions, how?

With PHPUnit it's quite easy to test raw PHP code, but what about code that heavily relies on cookies? Sessions could be a good example. Is there a method that doesn't require me to setup $_COOKIE with data during my test? It feels like a hacky way of doing things. ...

CakePHP 1.3.0 Cookie value not decrypting

I noticed in Firefox when viewing the cookies that the values I am saving are encrypted. The CakePHP Book states that values are encrypted by default on write(). My assumption is that they are automatically decrypted on read(). I can't seem to find any gotchas in the doc. Anyone else experience this problem? I am sure I am missing somet...

facebook oauth secure?

I have been implementing the 'login through facebook' button on my e-commerce site by using the javascript sdk and the example here: http://developers.facebook.com/docs/authentication/ . However, i have noticed that the cookie created by the sdk can be transmitted through http (as opposed to https) and I am pretty sure this is not the s...

Django : In a view how do I obtain the sessionid which will be part of the Set-Cookie header of following response ?

In case of views that contain login or logout, this sessionid is different from the one submitted in request's Coockie header. I need to retrieve it before returning response for some purpose. How can I do this ? ...

problem with setting a cookieless domain

Here is the header from firebug that shows the scope of the PHP Session cookie: Set-Cookie PHPSESSID=f0e2dfe56cc78be718c8154ac80d1ae2; path=/; domain=pix-all.com But still the PHP Session cookie is been sent for any requests to static.pix-all.com Cookie PHPSESSID=f0e2dfe56cc78be718c8154ac80d1ae2; What could be the problem? ...

How do you send information from one window to another in the same program?

In the program I am trying to build, I have a menu button that opens a second window. The user puts information into the second window, presses the "Done" button, and the information is transfered into the main window. The problem I am having is opening the second window. I have both windows build in xaml files in Visual Studio but I ...

Safari javascript cookie issue

I've hit a bit of a weird issue in Safari in regards to setting a js cookie. The cookie itself is just a rgb colour value, which gets set using .click(), and is working fine in Chrome and Firefox, yet in Safari the value of the cookie is incomplete, showing up as rgb(193 instead of rgb(193, 184, 76) as the other browsers do. The jQuery...

how to set expiration date on a cookie in cfscript

don't seem to be able to set the expiration date of a cookie within cfscript. any hints? it's coldfusion 9 btw. ...

Stopping cookies being set from a domain (aka "cookieless domain") to increase site performance

I was reading in Google's documentation about improving site speed. One of their recommendations is serving static content (images, css, js, etc.) from a "cookieless domain": Static content, such as images, JS and CSS files, don't need to be accompanied by cookies, as there is no user interaction with these resources. You c...

Is it possible to serve an ASPX page without it setting a cookie on your browser?

Hi, we're in the process of trying to speed up the performance of our website by serving static content from a cookieless domain. That seems to be going well, but I have a new question: I know that it's "static content" that we're talking about when serving it from a cookieless domain, but we also have static content being served by ASP...

Use jquery cookies in showing/hiding elements (jQuery)

Hello, How to use jquery cookies in showing/hiding elements in a page ? I got the plugin from here Tried some method but i am not successful. I used slideUp() and slideDown() functions to show/hide elements. When a element is slided up a cookie should be set. when the page is refreshed, the element should be in slided up position How...

why cookie.getMaxAge() = -1?

i have a test like this : cookie.jsp: <html> <head> </head> <body> <% String cookieName="SNS"; Cookie cookie=new Cookie(cookieName, "maxAgeTest"); cookie.setMaxAge(60*60); response.addCookie(cookie); %> </body> </html> and read.jsp is : <html> <head> </head> <body> <table border=1> <tr><td>Name</td><td>va...

Replace a DIV with another using effect and set cookie

Hi. I've got some complicated requirements and wondered if there's a way to accomplish this via jQuery: User comes to a web page for the first time today and we show DIV_1. After 30 seconds, we dissolve DIV_1 to DIV_2. We set a cookie on the user's machine that expires when s/he returns tomorrow. If the same user returns today, we only...