cookies

Coldfusion StructDelete creates blank value

末鹿安然 提交于 2020-01-04 04:06:08
问题 I'm using Codlfusion 9's StructDelete() method to remove a value from a cookie. But after using StructDelete(cookie,"selector12") I'm getting a value of [empty string] for cookie.selector12 despite deleting it This is the code I'm using: <cfdump var="#cookie#"> <!--- kill any existing selector cookie when looking at a profile ---> <cfset structDelete(cookie,'selector#URL.clk#')> <cfdump var="selector#URL.clk#"> <cfdump var="#cookie#"> To give the following output: Does StructDelete actually

Securing Cookies for Default MVC 5 Application

纵饮孤独 提交于 2020-01-04 02:52:30
问题 I've started a new MVC 5 application in VS2013 (with Authentication = Individual User Accounts in the wizard). I'm looking at my web.config file and it says: <authentication mode="None" /> However, I can clearly create an account and login to my site. So this is a little bit of a mystery. I have read that if I were using forms authentication, that I would need to mark my cookies SSL-only for my site to be secure (just got SSL working yesterday). Is there an analogous step if my authentication

use same php session on another website on link click

我的梦境 提交于 2020-01-04 02:45:14
问题 I have a question. Let's say I am on website domain1.com and I click on a link on domain1.com that brings me to domain2.com . But I want to use the same session_id() that was set with session_start() in domain1.com on domain2.com . How do I accomplish this in PHP? Thank you. 回答1: As the session_id() itself doen't contain any data, there are a couple of things to consider: If the session is set in a cookie, you can't transfer it (unless to a subdomain), make sure you transfer it via GET In

Multiple cookies with same name

﹥>﹥吖頭↗ 提交于 2020-01-04 02:14:24
问题 I just figured out that I have a problem in IE while working with one of my pages. I set cookie with: setcookie('page', '12345', '2000000', '/'); And if I login I reset the cookie calling that function again. In firefox everything works fine cause the old cookie is deleted but in IE both cookies stay? How can this happen? Isn't that illegal? now I fixed that with: setcookie('page', '', time() - 3600, '/'); setcookie('page', '1234', '2000000', '/'); Is this ok solution or am I missing

rails 3 cookies

旧巷老猫 提交于 2020-01-03 21:04:14
问题 I have a simple app where users type in stuff in a text filed to get various results. I would like a feature where if a user enters something and then closes the browser tab, the next time they come, I can show them their previous/recent searches. This will persist even if they close the whole browser and open it again. I believe this can be done by help of cookies. Are there some good rails3 gems for using cookies or any simple tutorial that could guide me in a direction? 回答1: http:/

rails 3 cookies

泪湿孤枕 提交于 2020-01-03 21:04:11
问题 I have a simple app where users type in stuff in a text filed to get various results. I would like a feature where if a user enters something and then closes the browser tab, the next time they come, I can show them their previous/recent searches. This will persist even if they close the whole browser and open it again. I believe this can be done by help of cookies. Are there some good rails3 gems for using cookies or any simple tutorial that could guide me in a direction? 回答1: http:/

creating a cookie failing with safari, chrome, ie but working with FF

允我心安 提交于 2020-01-03 20:55:55
问题 We are using the following code to create the security cookie. Everything works fine in Staging environment, however in the production environment the following code is unable to create a cookie in Safari, Chrome or IE but it does create a cookie successfully in Firefox. anything that you guys think i am missing or is wrong in here ? public static void SetAuthenticationCookie(CustomIdentity identity) { ConfigSettings configSettings = ConfigHelper.GetConfigSettings(); string cookieName =

How to get innerHTML from a div?

萝らか妹 提交于 2020-01-03 20:03:34
问题 I need to save the innerHTML of a div and store it in a cookie. Here is my basic code. //The div-saving function function addStatus(sName){ getElement("bottomDiv").innerHTML += sName + "<br>"; document.cookie="status=" + sName + "<br>"; } //The button clicking function function clk(){ num++; document.cookie = "num=" + num; switch(num){ case 25: addStatus("25: Alright! Let the games begin!"); break; case 50: addStatus("50: Woah! Getting into the high numbers!"); break; } } What ends up

How to get innerHTML from a div?

时光总嘲笑我的痴心妄想 提交于 2020-01-03 20:03:11
问题 I need to save the innerHTML of a div and store it in a cookie. Here is my basic code. //The div-saving function function addStatus(sName){ getElement("bottomDiv").innerHTML += sName + "<br>"; document.cookie="status=" + sName + "<br>"; } //The button clicking function function clk(){ num++; document.cookie = "num=" + num; switch(num){ case 25: addStatus("25: Alright! Let the games begin!"); break; case 50: addStatus("50: Woah! Getting into the high numbers!"); break; } } What ends up

same session, different domains, set session id

时光总嘲笑我的痴心妄想 提交于 2020-01-03 20:00:08
问题 I have a couple of domains which i want to shere sessions. I have created a method like this: The user login is done in a central place and the sessions are saved in the database. Lets say the user A wants to go to abc.com domain. My app redirects it to the main authentication domain where he logs in. After login is generated an auth token which is saved in a field in the sessions table and it is pass back to the abc.com application. There I use the auth_token to get the session_id from the