Most voted "cookies" questions
Cookie, connection testimony, or simply testimony is a group of data exchanged between the browser and the page server, placed in a text file (file) created on the user’s computer. Its main function is to maintain HTTP session persistence.
Learn more…173 questions
Sort by count of
-
1
votes1
answer198
viewsDisplaying date a cookie expires in php
Currently I serve my cookie like this: setcookie("visita","sim", time() + 172800, $path = "/"); // 86400 = 1 dia, 172800 = 2 dias (SEGUNDOS) But how can I show on a php page like this: Your "visit"…
-
1
votes0
answers31
viewsLog in changing cookies
Is it possible to change cookies from one page to another account? For example I change cookies from one browser with data from the other
-
1
votes1
answer1018
viewsSave User Session/Cookie when logging in
In WEB applications usually on the Login screen has the option Remind me, in this application will save user data once the same leave marked the option. So when the user enters the site again,…
-
1
votes1
answer185
viewsSave div to a cookie
I’m starting to mess with cookies, so I don’t know much. I was hoping he’d save a certain <div> but I don’t know how to do it. Like I’m doing: check if that cookie exists: $nomecoook =…
-
1
votes1
answer706
viewsRemove Cookie when closing your browser
When the application starts, I need to open a modal for the user to choose an environment, so I created a cookie in JS to store if this is the first time the user opened the application, follow the…
-
1
votes1
answer248
viewsLaravel 5.1 access cookie generated in middleware before being redirected to view
In my application I have an authentication system with token_ and refreshtoken_ and I have a middleware to verify that the user is logged in and to renew their token_ if it is expired. After I renew…
-
1
votes1
answer139
viewsError setting cookies with expiry date with javascript "When browsing session ends"
I have the following code: function createCookie(name,value) { name = "testeeee"; value = "conteudo do teseeee"; var date = new Date(); date.setTime(date.getTime()+(720*60*60*1000)); var expires =…
-
0
votes2
answers795
viewsPHP Cookie is not set on remote server
I implemented a cookie that works on the local server but doesn’t work on the remote server, I don’t understand why. Thanks for any help. I have the following code: <?php if…
-
0
votes1
answer371
viewsHow to take multiple data from a page and display separately with AJAX
I have a program where it creates cookies with the data that the user typed in the fields <input>. All this through AJAX. So far without problems, but in this file where I make the request, it…
-
0
votes1
answer1248
viewsHow to retrieve content from a cookie
As I do to retrieve the content of a cookie, this cookie has the ID of the material that will be requested and the amount, I need to recover to enter in the bank. I’ve searched the Internet a lot,…
-
0
votes3
answers228
viewsHow to get user/visitor name and write it on the screen?
Do you know how to ask the user name and use? I’m setting up a website that is also a virtual store. I want the store to be nice to whoever comes in, Asking for a name, being nice, saying, "Okay,…
-
0
votes1
answer727
viewsHow to create cookies for popup advertisements open 1 time only 24 hours
I could use a little help with my website. For a long time I use the popup format to modernize my site, however gain for the first time it is displayed to the same user within 24 hours... Only this…
-
0
votes1
answer1459
viewsHow to pick up an existing cookie via javascript
In my project I have a page that is html. And since my project is in Asp.net mvc, I can’t validate whether the user is logged in or not because this page is not Razor. Researching, I found the…
-
0
votes3
answers1164
viewsIs there a way to decrypt MD5 in php?
there is some way to decrypt md5 in php ? I need to decrypt the value that comes from a cookie to get user information
-
0
votes1
answer35
viewsButton with cookie and Location
At the beginning of my page includes the cookie: <?php setcookie("agenda","2016");?> At the bottom of the page, without using form, I have the following button: <button class="button…
-
0
votes1
answer309
viewsHow to save Cookies permanently and retrieve them later? [Android]
I have an app Android that makes a request to a Web server and later saves three Cookies in one CookieStore. In the meantime, I’d like to store these Cookies so that when the application is…
-
0
votes0
answers27
views -
0
votes2
answers1851
viewsPHP - Cookies, how to detect if you are created
How do I detect if a cookie exists ? My cookie is created like this: setcookie("log", "true", time()+60, "/classes"); And to detect I’m trying it: if (!isset($_COOKIE['log'])) { //função } But it…
-
0
votes2
answers57
viewsRestrict . htacess rules to a single folder
I need to optimize a page that is inside a folder /website and would like to enable cookies, but they cannot be enabled for other folders. How can I make a condition or rule that limits only to that…
-
0
votes1
answer120
viewsProblems with login cookies
In the login page send the form with your login data, record the data in cookies and redirect to another page. But I am suffering problem if the user logout, I wanted to delete the cookies, on the…
-
0
votes1
answer395
viewsProblem with cookies in php
I’m trying to generate a system that records a person’s email into a cookie so that they can add a list of a website’s properties to the database and when they upload the site via their email pulls…
-
0
votes2
answers365
viewsLosing cookie (created in javascript) when switching pages
On the HOME page I record a "x" value in cookie. var dataAtual = new Date(); var expire = new Date(); expire.setDate(dataAtual.getDate() + 1); document.cookie = "NomeCookie=ValorCookie; expires=" +…
-
0
votes0
answers61
viewsSave two cookies, one to the root and one to a subpage
I’m wanting to use cookie on my site to change style, but, I have conflicts, I asked the question on this link: Stylesheet with cookie works only the second time The solution Bacco presented worked,…
-
0
votes1
answer10
viewsAccess values set in Controoller in Prestashop 1.6
I’m setting the value of the cookie on Frontcontrolller: this->context->cookie->utm_campaign = $_GET['utm_campaign']; However when accessing Orderconfirmationcontrollercore is coming null:…
-
0
votes1
answer173
viewsHow to hide cookies.txt from the Curl
I have a php code that makes a request with Curl on a page, but it saves cookies in a cookies.txt text file, and anyone can have access to that file in a direct link "www.meusite.com.br/cookies.txt"…
-
0
votes1
answer312
viewsFunction with cookies in PHP
I need a php function that checks if the user has already accessed such a file, if yes, opens X javascript file, if not accessed, opens another javascript file. Example: 1° access = open test.js 2°…
-
0
votes2
answers533
viewsHow to delete PHPSESSID
I’m making a cart with $_SESSION and when the purchase is completed, should clean or delete the PHPSESSID (self-created). But I’m not able to delete or update. I’ve tried with unset() and…
-
0
votes1
answer63
viewsCookies do not work
Hello folks a friend here from the forum helped me make a button and I thank him very much, it worked perfectly. However I failed to put cookies and I don’t understand where I’m going wrong (I was…
-
0
votes3
answers1959
viewsHow do I restrict access from a page to logged in users?
I am login and registration system with 2 levels (1 corresponds to the common user and I want it to be redirected and level 2 is ADM, ADM have no problems). Be able to redirect to the site the…
-
0
votes1
answer164
viewsTwebbrowser and Httponly cookie
How to get the Httponly cookie from Twebbrowser? when logging into a page by IE, Firefox, or Chrome I see the following cookie: Cookie:_ga=GA1.3.2133370562.1518083464;…
-
0
votes2
answers131
viewsStore array within Cookie
It is possible to store a array within a Cookie? I’m trying this way: $carrinho = array(array('frete' => '', 'mercados' => array())); Cookie::queue('carrinho', $carrinho, 525600); But the…
-
0
votes1
answer124
viewsXamarin.Forms Ios Webviewrenderer sharing Cookies
I am using a Webviewrenderer to configure the cookie policy and also to share cookies from an Httpclient login request. Turns out no matter how much I set: var cookieJar =…
-
0
votes1
answer1689
viewsCheck if cookie exists with Javascript
I have a cookie set with javascript, I created it like this: document.cookie='gravado=sim' I don’t know how I’m gonna make sure he exists. I need to make a check because if it does not exist, I will…
-
0
votes1
answer109
viewsRedeem Cookie Values
Good afternoon I have an application in MVC that generates some cookies, I wonder if it is possible to redeem these cookies through an Api, because I tried and unfortunately could not. Code…
-
0
votes1
answer260
viewsSave form data to cookie and popular form with this data after page re-load
I have a page with filters, being 4 selects, an input search, 2 input date and a Submit, I need to keep the data selected after page Reload. In other words, I put the data to filter and after…
-
0
votes1
answer620
viewsWhat is Netscape HTTP Cookie File for and how?
I need to save cookies of some accounts that authenticate my APP on Twitter, searched the web and found something like:? # Netscape HTTP Cookie File # https://curl.haxx.se/docs/http-cookies.html #…
-
0
votes0
answers124
viewsSave cookie when you click inside a DIV
I have a DIV, in it goes ads.. and I want you to create a 2-day cookie.. That is, Before loading the page it checks if already clicked somewhere in the DIV in the last 2 days, if already clicked it…
-
0
votes0
answers39
viewsRecover Cookies after logging in
I have the following code: <?php if (isset($_POST['ttrSignin'])) { $ttrUsername = trim(filter_input(INPUT_POST, 'ttrUsername')); $ttrPassword = trim(filter_input(INPUT_POST, 'ttrPassword')); if…
-
0
votes1
answer63
viewsHow to use PHP variable on other pages
I have a script that brings the results of an sql search as follows: $sql = (...); $result = $db->query($sql); while ($obj = mysqli_fetch_object($result)) { $ids = $obj->id_prestador.","; } If…
-
0
votes1
answer148
viewsManipulate cookie for Popup
Hello, I’m trying to do a popup, I’ve already set up its structure, I just need to do the validation so it doesn’t keep opening every time I visit the page, I’m trying to use cookie, I don’t know if…
-
0
votes1
answer640
viewsAutomatic refresh only once in PHP
I need to do an automatic "refresh" on some pages of a customer’s site. However, this "refresh" needs to happen only A time. I know I could put the meta tag below, for example: <meta…
-
0
votes2
answers1733
viewsProblem with $_SESSION on login system, $_SESSION closes alone
My login system is not working... In my project I have a file called header.php <?php ob_start(); //abrir sessao session_start();//iniciar sessao error_reporting(0); //ignorar alguns erros…
-
0
votes1
answer175
viewsHow to configure user downtime in Asp.Net Core?
I started studying Asp.Net Core these days, I’m working with version 2.1. I can already log in and log out of the user, only I don’t know how to set his downtime. I put this code, but after a few…
-
0
votes0
answers36
viewsError creating json cookie with jquery
I’m trying to create a simple cookie with a json key value, but I’m getting it from the browser (click on the photo): This is the plugin I’m using Code, it goes below: $.cookie("gavetaMilagres",…
-
0
votes1
answer213
viewsCache Session in Python
I have a script Python running a Tornado application. Inside the onmessage I have several variables that will keep an equal value always, so there is no need to fill them in whenever a new message…
-
0
votes0
answers15
viewsPHP Warning error: Cannot Modify header information - headers already sent by, but to delete the page cookie after displaying it
I know there are already questions about this mistake, but I need some help because I can’t solve it, even with the information about the error. I am making a website that sets a cookie to show an…
-
0
votes2
answers222
viewsHow to create a javascript function to check whether a cookie has been saved or not?
I’m an information systems student and I’m learning how to create cookies in javascrit using functions and webstorege, but I’m having trouble creating the function to check if a cookie has been…
-
0
votes1
answer372
viewsHow to Expire Cookies?
Eae you guys, It is as follows I have created a login system that uses cookie to remember the password of the user until then everything well works normal, the problem is time to inspire these…
-
0
votes1
answer49
viewsHelp! Cookies and javascript for affiliate program creation
I need to create an affiliate program, where every registered affiliate will receive a single link with a link related to their ID in DB, for example: example.com/affiliated? 4312123 I need to…
-
0
votes1
answer120
viewsHow to display or extract all "cookie" information from a python page?
I’m trying to extract the cookie from a page but I can only get information from the NID: import requests session = requests.Session() response = session.get('https://www.google.com/')…