cookies

Local Storage vs Cookies

I want to reduce load times on my websites by moving all cookies into local storage since they seem to have the same functionality. Is there any pros/cons (especially performance-wise) in using local storage to replace cookie functionality except for the obvious compatibility issues? ...

Load a picture in a webpage from Flash

I'm editing a web page to access it only after login, so now it's a php page with an inital <?php session_start(); ?> and in the body of the page I test the value of a session variable. All works fine but in the header there is flash animation that don't load background picture. In the old version of the page this picture was loaded f...

Accessing $_COOKIE immediatly after setcookie()

I'm trying to access cookie value (using $_COOKIE) immediately after setcookie() function in PHP. But, $_COOKIE['uname'] returns blank. Why? Whereas, $_COOKIE['uname'] returns actual value when trying to access in next execution of the script. setcookie('uname', $uname, time()+60*30); echo "Cookie value: ".$_COOKIE['uname']; ...

Use JQuery Cookie Plugin to save selectlist item in header?

Hello yet again! I created a ajax/ coldfusion select menu in my header on my website that allows one to select a department. This sets a session variable to the department ID. I want to be able to take my "datas" which contains the value of the select box and make sure that variable is applied to the selectlist everytime the header is di...

Disable Google Anayltics cookie from being sent to cookie less domain

To optimize my site i have set up a static subdomain for content such as images, css and javascript. How do i stop the google analytics tracking cookie from being sent to my static subdomain, but still to both example.com and www.example.com? Have already looked through some of the documentation with no luck ...

Question on PHP cookies

I came across the snippet below: setcookie('foo', 'v1', time() + 60*60*24, '/'); setcookie('foo', 'v2'); What is the effect of setting 2 cookies with same name but different values? Is it common in practice? Where is it used? ...

Signed session cookies. A good idea?

In an effort to increase performance, I was thinking of trying to eliminate a plain 'session cookie', but encrypt all the information in the cookie itself. A very simple example: userid= 12345 time=now() signature = hmac('SHA1',userid + ":" + time, secret); cookie = userid + ':' + time + ':' + signature; The time would be used for a...

jQuery cookie not clearing upon UI close

As you can see, I'm using cookies to pop up modal confirmation boxes and alerts. While these have worked for a long time until very recently, I must have added something to this chunk of code and it all went haywire. The "close" function on the modal is supposed to clear the cookies so the pop up won't pop up anymore, now it is not clear...

Jquery, Cookies and Blogger

On my Blogger Blog I have this code in the template <b:if cond='data:blog.pageType == &quot;index&quot;'> <b:else/> <p><data:post.body/></p> </b:if> This code basically shows the body of the blog post only when it's on an individual blog page. You can see an example here www.spoilertv.com When you are on the homepage only the post t...

IE7 and IE8 dropping cookies

Hi, We've recently upgraded our production systems from Java 1.5, Apache HTTPD 1.3 and Tomcat (sorry, not sure which version) to Java 1.6, Apache HTTPD 2.2 and the latest version of Tomcat (again, sorry, not sure of the numbers). Since this upgrade, we've noticed that a (very) small percentage of traffic to our site from IE7 and IE8 dr...

Retrieving cookie from a Container in ASP.NET MVC and C#

//Controller code CookieContainer cookieContainer = new CookieContainer(); //makes new cookie here cookieContainer.Add(myCookie); //Service/Facade code //myCookie gets passed here How do I pull the cookie out of the container to make sure it's the right cookie? ...

will this work as an alternative to http cookie?

I'm using php for my site and was wondeirng if it would be a good idea to use the $_SERVER md5($_SERVER['remote_addr'] + $_SERVER['http_user_agent'])) into a cookie_auth field in the user table. When the user logs in, php will use the above key to re-check the current user and compare it to the stored key and if matched get credintial...

How to set Cookies at Http Get method using Java

I want to do a manual GET with cookies in order to download and parse a web page. I need to extract the security token, in order to make a post at the forum. I have completed the login, have read the response and extracted the cookies (3 pairs of (name,value) ). I then wrote the String containing the cookies like this: CookieString="na...

Reading secure cookie in ColdFusion

I have a cookie that is being set by Microsoft ISA. I want to check that the cookie exists from ColdFusion, but the cookie isn't listed in the cookie scope. The page I'm trying to read the cookie value from is using HTTPS. Why can't I read the cookie? All the non-secure cookies are listed in the cookie scope. ...

WebClient Cookie confusion

-edit- nevermind. I ran the code again and it appears i cant log into that first site anymore. It must have been a weird cache issue or something. Maybe i overlooked something. WebClient seems to ignore cookies so logging onto a site shouldnt work. I figured out how to login to websites using WebClient. On the first website i tried i co...

Best way to implement a Web 2.0 navigation system

Now here is my situation: I'm making a CMS. When links are clicked, i would like the pages to load dynamically using Ajax. The problem in the links! The only way to change the address in the address bar real-time is to use anchor tags. But PHP doesn't get the anchor tags, thus I can't load page content on site load using PHP. And if i w...

Facebook Connect & ASP.NET Forms Authentication - Timing/Cookie Problem

Hi Guys. Here's what i have: ASP.NET 4.0 Web Application Forms Authentication (Cookie Based) Here's what i'm trying to do: Integrate with Facebook Connect (using the JavaScript & Graph API's) Provide a Single-Sign-On Service for my users (automatically log in users if their logged in and connected to Facebook)...

Set Domain on ASP Session Cookie

How do I set the domain on the session cookie generated by classic ASP? I'm using 2 urls for my site, www.example.com and shop.example.com and I need the session cookie sent to both. ...

How do I store this JSON object as a cookie and than read it in vanilla javascript?

I can actually seem to write it fine as a cookie like this: ["4c3dd477c441e17957000002","4c2ac3cc68fe54616e00002e","4c3dd477c441e17957000003","4c3dd477c441e17957000004"] But how do I read the cookie? I'm using node.js/express.js (and coffee script), and when I read it the cookie key the value I get is just the first value of the abo...

How did CNN get my Facebook login information?

I browsed to CNN and was horrified to see my Facebook picture there with a "post a comment" box. How did CNN get my Facebook login information? More specifically, how did CNN know I was logged into Facebook? It seems like CNN would have to have access to a cookie set by Facebook to do that. This is the only sequence I can think of. I...