cookies

How should I create cookie through flex/coldfusion that is readable by another template?

Inside a flex app, I have a user login. The login calls a ColdFusion function as a remote object which authenticates the user and, if applicable, returns their id and access level. This works fine, but now I'm at the point where I want to also create a cookie for another ColdFusion template (called from fileReference.upload()) to be able...

Session vs Cookie vs Custom IPrincipal

Hi Guys, I'm working on a project where certain logged in users have a dedicated page which they can choose the url of. When a user logins in i would like to display a link "View my page". I was just wondering what is the best way to store this baring in mind it needs to be accessible for as long as the user is logged in (The site has a...

ASP.net session cookie lost or deleted

I have an ASP.NET 2.0 site that stores a user's ID in session to indicate that they are logged in. In some situations, the user doesn't appear to stay logged in. I've been monitoring traffic in Fiddler, and some details I've found: The problem is 100% repeatable on an older laptop of mine when running IE7 and the project manager's lapt...

What is the secure and effective way to keep visitor's view stat? (cookie only is not enough)

The requirements: For each item in the shop, keep stat about visitor's view. During the first 15 mins, do not count the same visitor even though that visitor re-open the web browser Need a way to protect visitor's cheating (The above 2 requirements should always be apply) For example of cheating, If we're using Cookies, this is not goo...

How to detect if user is connecting from a recognized computer?

On many banking and investment websites, the site prevents users from logging in from an unrecognized computer without first answering an additional question or activating that machine. How do developers typically create this feature? For example, here is the message that Salesforce.com gives when I connect to my account from an unreco...

Cookie being reset / wiped out

I have developed a web app using asp.net mvc. I've deployed it onto the server and experiencing a problem I didn't get when developing the website locally. When I log into the website I navigate through and its fine. However if I leave it a while then try and navigate again I am logged out and redirected to the login page. I'm using th...

When using AJAX should you do everything through AJAX or is it OK to use headers too?

I know when you request a page normally it is typically the case that you would use server side session data and set cookies via HTTP headers, but does it work the same when the content is requested via AJAX? ...

Sample code for POST + cookie?

Hello, I've been googling for some VB.Net code to authenticate to a web server with the POST method, receive a session ID in a cookie, and then send this cookie along with all GET queries... but all I found is half-working code or C# code, ie. difficult to use for a VB.Net newbie. Would someone have some code handy or some pointer that...

Does a cookie have to be set in the http header?

Would like to set cookies from the server (CGI - C) Can it be set after the header has been printed? Thanks. ...

How is a cookie dynamically set based on user input?

How is, for example, a shopping cart cookie set? Once something is added to the cart it "creates" the cookie but how does the next page know to send a new http header with this new cookie to the client? How is a cookie dynamically set based on user input? Is this functionality dependent on anything else? I did see this example, but ...

ASP.Net FormsAuthentication Redirect Loses the cookie between Redirect and Application_AuthenticateRequest

I have a FormsAuthentication cookie that is persistent and works independently in a development, test, and production environment. I have a user that can authenticate, the user object is created, the authentication cookie is added to the response: 'Custom object to grab the TLD from the url authCookie.Domain = myTicketModule.GetTopLevel...

Saving CookieStore in http client service

I have a Service for my Android app that performs HTTP calls. The Service stores cookies in a CookieStore. I am trying to find a way to persist the CookieStore but I haven't been successful. I don't want the user to log in every time to receive a new CookieStore. I tried to use SharedPreferences to store the CookieStore as a string, bu...

Cannot get value from cookie in Java. Value contains colons.

I have problem with getting value from cookie that contains commas. It returns not full string but string cut off to first comma. For example: // cookie value = var1,var2,var3 String cookieVal = cookie.getValue(); //cookieVal now is "var1" instead of "var1,var2,var3" and // cookie value = var1=var2=var3 String cookieVal = cookie.getV...

Do (javascript) cookies work when outside of a webserver context?

Say i have a file test.html that uses javascript cookies. (a) When i access the file like this: http://mydomain.com/test.html cookies work fine. (b) But if i just double click the file to directly open it in a browser (with a url like: file:///folder_path/test.html) then cookies do not work. Is this the way it should be or am i doing ...

How can I iterate over cookies using jquery (or just javascript)?

I am using the "Cookie Plugin" by Klaus Hartl to add or update cookies at $(document).ready. I have another event that is supposed to iterate all the cookies and do something with the value of each cookie. How can I iterate over the collection of cookies and get the id and value of each? I'm thinking something like this: $.cookie.each(...

Why doesn't javascript have better support for cookies and querystrings?

It seems like cookies and querystrings are firmly established in the web world. Nevertheless, javascript makes you do all kinds of splits and parsing to get at the keys and values. Anyone have any insight on why there isn't more intuitive native support for things like cookies and querystrings? Admittedly, there are plugins and framewor...

Detecting whether cookies are enabled through Java

Is it possible in Java (SE, not J2EE) to detect whether cookies are enabled in the default browser? This isn't a client/server application. It's simply a desktop application that happens to interact with the default browser. ...

When should I use session variables instead of cookies?

Session variables and cookies seem very similar to me. I understand the technical differences, but how do you decide when to use one vs. the other? ...

IE8 & ASP.Net Forms Authentication Cookies fail when opening multiple browsers

I have the code below on a login page. I'm using this to set the login timeout by customer. In IE8 I'm running into the problem that if a user opens another browser window, then logs out in the first window, when they relog back in they get bounced back to the login after a single page (every time). If they don't open another browser, e...

(PHP) How to destroy the session cookie correctly?

I'm trying to correctly log out of an admin user. Here is my function: function logout() { $_SESSION = array(); //destroy all of the session variables if (ini_get("session.use_cookies")) { $params = session_get_cookie_params(); setcookie(session_name(), '', time() - 42000, $params["path"], $params["do...