cookies

Cookies not present after using XMLHttpRequest

Update: It looks like after receiving a 403 response, the xmlhttprequest just hangs there, and so the document.location code is never executed, any ideas on how to get around this? I'm trying to make a bookmarklet to download videos off of YouTube, but I've come across a little problem. To detect the highest quality video available, I ...

How to add multiple cookies to Response in WCF / REST service

I have access to WebOperationContext and can add one cookie by doing this: WebOperationContext.Current.OutgoingResponse.Headers.Add("Set-Cookie: foo_a=bar_a"); However if I call that several times, e.g.: WebOperationContext.Current.OutgoingResponse.Headers.Add("Set-Cookie: foo_a=bar_a"); WebOperationContext.Current.OutgoingRespons...

Why is this HTTP request continually looping?

I'm probably overlooking something really obvious here. Comments are in to help explain any library specific code. public function areCookiesEnabled() { $random = 'cx67ds'; // set cookie cookie::set('test_cookie', $random); // try and get cookie, if not set to false $testCookie = cookie::get('...

Can't set cookies in PHP?

For some reason This php script won't echo anything: <?php setcookie("pop",'hi',time()+604800); echo $HTTP_COOKIE_VARS['pop']; ?> ...

Whats wrong with my cookies?

For some reason This php script won't echo my cookie variable: <?php require 'connection.php'; require 'variables.php'; $name = $_POST['name']; $pass = $_POST['pass']; if(($name == $admin_name) && ($pass == $admin_pass)){ setcookie($forum_url."name",$name,time()+604800); setcookie($forum_url."pass",...

How to share session cookies between Internet Explorer and an ActiveX components hosted in a webpage?

I am currently working on a .Net application which makes HTTP requests to some web applications hosted on a IIS server. The application is deployed through ClickOnce and is working fine on simple networks architectures. One of our customers has a very complex network involving a custom authentication server on which the user has first to...

Rack::Test not able to find web app cookie

While testing a Sinatra app with Cucumber, Rack::Test was not able to find the cookie that my app created, even though I could clearly see that it was in the Rack::Test::CookieJar object by dumping it with "p". ...

Javascript Phone Swap

I've been trying to find a way to do this but, have not found many resources that specifically relate to this situation. I need a javascript (can make use of Jquery if need be) to swap phone numbers on a site. 2 numbers would be specified. One would show on the site by default. The script needs to be able to create a cookie and do th...

jquery cookie - hoursToLive

Hi guys, i'm using the jquery cookie plugin. Everything works fine except the fact that I have no idea how to set an expiration-time for the cookie? $.cookie('opt_visible', 'true'); the jquery-cookie documentation says: hoursToLive (DEPRECATED for expiresAt) NUMBER For how many hours should the cookie be valid? (Passing 0 mea...

If cookie found, get data, else create cookie, is this good logic?

I have an Action that basically adds an item to a cart, the only way the cart is known is by checking the cookie, here is the flow of logic, please let me know if you see any issue... /order/add/[id] is called via GET action checks for cookie, if no cookie found, it makes a new cart, writes the identifier to the cookie, and adds the it...

Setting cookie for site in http and https under different subdomains in PHP

Situation: I'm trying run an https store (xcart) under one domain secure.example.com and I want to have access to a cookie it sets in http www.example.com I'm running PHP on Apache (MAMP), testing in Firefox with Firecookie The existing code sets cookies to .secure.example.com. I'm not sure if this is xcart related, but setcookie is ac...

Maintaining session information between 2 asp.net calls programmatically?

Hi, I'm not sure if I'll be clear enough in my explaination to make you guys understand, but I'll try. Here's my problem: We have an external site which the users in our company connect to by giving their corresponding username and password. The external site is an ASP.NET website. We want to integrate this website into our intran...

Is it possible to authenticate on another website?

If I am on a website#1, and I enter my username/pwd for website#2 on a login page that is on website#1, and website#1, behind the scenes, makes a httpwebrequest to website#2 and posts to the login page. If I then navigate to website#2, should I be logged in? website#2 uses formsauthentication and I call a httpHandler that is on website...

Setting cookies for multiple sub-domains

Is it possible to set a cookie for http://www.example.com from a PHP file located at https://secure.example.com? I have some code that was given to me, that appears to try and fails at this. I was wondering if this is possible at all. ...

ASP.NET - Is it possible to block cookies declaratively in an aspx page?

Hi folks, can cookies be blocked using a page directive instead of doing it programmatic? ...

How can I detect if a request and response cookies are different?

I need to detect if a request cookie - value is different from a response cookie - value. Its not as easy as: if(cookiesArePresent) { bool isDifferent = HttpContext.Current.Response.Cookies[".ASPXANONYMOUS"].value == HttpContext.Current.Response.Cookies[".ASPXANONYMOUS"].value; } But I read that changing the Response.Cookies ch...

JQuery using cookies

Hi all, in my js file i want to be able to load a "splash screen" in a new air app im developing. At present when i call the splash screen it opens and closes fine, but its when i make it set a cookie it doesnt run at all. Please help... cookieSplash(); function cookieSplash(){ var cookieSplash = $.cookie('loadSplash'); i...

Javascript cookie delete

If I create a cookie in Javascript document.cookie = 'unseen' how do I delete it when I navigate away from this page? This is the only cookie I am creating on the page. ...

Standard way to persist data between requests in ASP.NET-MVC

What is the most standard or best way to persist data between requests? Should I use cookies or session variables? I'm interested in keeping data like sort order, sort column, and page number (for paginiation). I'm coming from a webforms background so normally this type of thing was automatically handled for me in the viewstate of th...

Asp.net Cookies and https

Every time we go into https, the cookie fields get lost but not the cookie value. For example: 1) Response.cookies["key"].value = "x"; // after going to https, consecutive request contains this value. 2) Response.cookies["key"]["field1"] = "x" // the cookie exists but all its fields get lost. The cookie fields works perfectly in all t...