cookies

JSON API intended for JavaScript use - handle session data server side, or in browser?

I'm building an API that will use JSON. The primary use for this API will be AJAX in a browser but it may also be used server-side by user's PHP scripts, etc. There are 2 ways I can do this (I think): Build the API so that it uses HTTP headers to set a session cookie and retrieve all data for maintaining state by using the COOKIE['ses...

Stick to my REST guns or break statelessness? Advice needed

Dear Abby, I wrote a RESTful servlet, and the UI developer wants to save the logged-in state on the server. He made this strange claim: "I haven't encountered a production REST implementation that is pure REST. The ones I've seen all have had the server maintain a session." I find this difficult to accept. First there's the technic...

WinInet InternetSetOption with INTERNET_OPTION_SUPPRESS_BEHAVIOR option not working as expected

Hi all and thanks for taking the time to read this. I have a c# application where I wish to override the default WinInet cookie settings. The goal is that even when the system WinInet cookie privacy settings are set to Block All, within my process, cookies will still be accepted calls. Reading the documentation, it looked straightforw...

Strategies to let a separate app talk to javascript in the browser

Here's the scenario: we have a separate app running on a computer (outside of the browser). It creates a folder with 10,000 downloaded thumbnail images. In the browser, we have a traditional browser app. It lets you browse through these images. In order to speed up the browsing dramatically, I want to let the app get the images from the...

iPhone App Cookie Delay

My iPhone app has a UIWebView that loads a page containing javascript that sets a cookie. It seems that if i set a cookie and exit the app within 10-15 seconds then the cookie is never saved, however if i set the cookie, wait 10-15 seconds THEN exit the app, the cookie is saved. Anyone have any info about why their is a delay and how t...

PHP Loginsystem: Remember Me

Hello, so I have my loginsystem for now. Now im coming to where i'd like to have a remember me that you can "check", before you log in. Now i know how to do this checkbox, but how store cookie to the user in the right way, secure and best way? I mean like facebook have their remember me checkbox, and when you have checked that once ever...

Facebook connect : Getting an error - Could not set cookie. Headers already sent

Hi All, I'm trying to integrate facebook connect on to my website using php sdk. I have successfully been able to get user data and stuff using connect. However, my session data is coming up in the URL cos the cookie is not been set. Can someone please let me know as to why this could be happening. Thanks, Alloi ...

CodeIgniter session help, cookies not secure?

I'm just getting into learning about sessions, and for my purposes, I want to create something that upon every request from the client, the server authenticates that user, and only then performs data-handling for that user. However, I have seen a lot of examples with CodeIgniter where the session is set up as thus: $this->load->library...

ASP.NET cookies for ASP page

I have a wierd situation where I have an ASP.NET page that sends the user to the ASP page, and data is passed from one to the other via query string. I've been assigned the task of changing this so that cookies are used instead of query strings. I'm a little clueless here. Is this possible? How do I get started? Do I need to worry abo...

Persisting div toggle state with cookies

Hello, Using the code sample below, how could I utilize the jquery cookie plugin so that the toggle state of each div element persist beyond the browser session. Thanks. <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery...

Storing a FileReference in a SharedObject

Hello, I would like to store a FileReference object somehow and load it when the SWF loads again. I tried to use the SharedObject class but it does not seem to work. I suspect that what I want to do is not doable due to security issues (not using Adobe AIR), but I wanted to check. Does anyone please know if there is anyway to store a ...

Safari 5 not sending all cookies back to the server

I'm seeing this issue with Safari 5 (actually it has been prevalent since at least 4.0.5), where it seems that it does not set cookies properly. The site works perfectly fine for Firefox, IE, and Chrome. However, I can verify that the cookie is being properly set by looking at Safari's cookies plist that it uses. On Windows 7 it's sto...

Cookie problem when deploying mvc app.

Hi, I have an ASP.NET MVC 1.0 app and am setting a cookie to hold data. It works fine when test in IE with VS2008. When I deploy to IIS6 site no cookie is created. Site uses HTTPS. I am checking Temporary Internet Files folder for the cookie. Any ideas of things to check? Malcolm ...

ASP.NET and 400 Bad Request Error

Sometimes I get 400 Bad Request error for different websites written on ASP.NET. The only solution I know is to clean up cookies for that site. Seems like that the cause of problem is _utmz and _utma cookies, which belong to Google Analytics. The problem is occurs in common cases in Mozilla FireFox, sometimes on Ghrome and Safari and ne...

Get form authentification cookie from asp.net

I'm creating some dynamic pictures with the IHttpHandler interface. Then I wont to create a pdf document, where those pictures are included. But I need to copy the authentication cookie to my new HttpWebRequest object. How can this be achieved? I use normal asp.net forms. ...

How to create persistent cookies in asp.net?

Hi, I am creating cookies with following lines: HttpCookie userid = new HttpCookie("userid", objUser.id.ToString()); userid.Expires.AddYears(1); Response.Cookies.Add(userid); Now How to make it persistent? Because if I visit the same page again after closing the browser, I'm unable to get it back. ...

HTTP_CLIENT_TIMEOUT and cookie expiry period are same?

Is HttpURLConnection.HTTP_CLIENT_TIMEOUT is true, then does this mean session expired? If yes, Then, does this same as, cookie expiry ? ...

Cookie not working in IE

Cookie is not working with IE. The browser is set to allow cookies. Works fine in Firefox... and works fine in IE when I run it locally. But as soon as I publish, it breaks. It is used for a poll so a user cannot vote more than once. The following code runs once a user tries to vote: if (Request.Cookies["Poll"] != null && Request.C...

Cookies get cleared on closing browser window in IE

I am using cookie plug in my application. where i display some information from cookies. it is working fine with firefox, but have some issues with IE. It works fine if i open a new tab in IE, it shows values from cookies, but if i close IE browser window it clears all cookies. this is not the case with mozilla, every time i open mozilla...

cookie management in mvc

i want to add some stuff to cookie in ASP.net MVC. what is best way to handle all stuff in a cookie or more cookie. any good way to handle cookie in asp.net mvc ...