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
-
2
votes1
answer243
viewsCookies for intelligent search in E-commerce
I want to do as for example on the Saraiva site: http://www.livrariasaraiva.com.br/ When doing a search (e.g., "Galaxy Backpacker’s Guide") the url is directed to a smart search url:…
-
2
votes1
answer190
viewsWhat characters can I not use for cookie names?
I’m developing a new authentication system to decrease complexity and increase security. And I’m developing a system where some authentication cookies will have randomly generated names for each…
-
2
votes2
answers1814
viewsHow to access the COOKIE on another page?
I have a file where he creates a cookie. And I have another file where I call this cookie, only it gives me that mistake: Undefined index: name in Here’s the code from the first file:…
-
2
votes1
answer179
viewsShow Div only on the second pageview and delete the cookie at a given time
I already searched and found nothing related, wanted a code to show a DIV in the second pageview of a person on a site, and not show more in a predetermined period.
-
2
votes1
answer179
viewsIs it possible to inject cookies through a website?
Suppose the following situation: When accessing a site (technology forum), this site would inject cookies so that when I access another site (store selling products), it would account for this visit…
-
2
votes1
answer74
viewsLimit to one click per person
I want to limit the click of a button to 1 click per computer. It is possible? Code so far: <html> <body> <br><br> <a style="color: grey; background-color: #fff;…
-
2
votes2
answers906
viewsLogoff with database registration and cookie deletion behind Session_end() in Global.asax
I need help with a project I’ve been racking my brain about for two days. I’m using Microsoft C# MVC5 technology and framework 4.5, I also use Entity Framework 6 with Repository Pattern, Unit of…
-
2
votes2
answers9379
viewsSave cookie and read its value when accessing the website to check if expired
I need to make a script in Javascript that follows the following logic: Record a cookie with a id, that goes from 1 to 3. Along with the cookie, the day/time OR I want it to expire in 8 hours. The…
-
2
votes2
answers4020
viewsHow to create a cookie in Javascript?
I want to make the next step: se (cookie[titulo] existe){ altera o valor dele para $valor }se nao { cria um com $valor } NOTE: I have a function that creates the cookie, called…
-
2
votes1
answer505
viewsStoring data for a while
Is there any way using the javascript cookies that I can store information for 3 hours for example ? In my scenario I need to have a warning page, but I don’t need to store these records in a…
-
2
votes1
answer198
viewsError of Session in user level validation
Good guys I am making a simple panel more with user level where I pass to the Session an array with three values, so far so good, the functions that validate the form, validates the bank user,…
-
2
votes1
answer325
viewsPrivacy policy and cookie blocking in the browser
Good morning, I put a system to remember users in my program in php, I used cookies for this, as I found in Google an explanation about them, but I came across the following: IE and some browsers if…
-
2
votes2
answers268
viewsSet value for a cookie
I intend to change a cookie value, I’m using: public static void main(String[] args) throws Exception { URL url; HttpURLConnection conn; url = new URL("http://google.pt"); conn = (HttpURLConnection)…
-
2
votes1
answer455
viewsRecover Cookies in Spring Security Authentication
How can I recover cookies when the user logs in through Spring Security and with the implementation of the interface AuthenticationProvider? If I recover an instance of HttpServletRequest from a…
-
2
votes1
answer263
viewsDiv appear only once
How to make a Div (not a pop-up, but more like a protective screen) appear once every 6 hours using Jquery and Cookies? I can’t use PHP because the platform I’m using is Blogger and it doesn’t…
-
2
votes1
answer4711
viewsHow to use cookies in javascript
I know how to create cookies in Javascript, but I don’t know how to apply them in some project. Someone could post an example of how to use cookies?
-
2
votes1
answer35
viewsIs it possible to store the tmp_name of a file in cookies?
I have the following code $allowed = array('png', 'jpg', 'gif','zip'); if(isset($_FILES['upl']) && $_FILES['upl']['error'] == 0){ $extension = pathinfo($_FILES['upl']['name'],…
-
2
votes1
answer1263
viewsWhat is the difference in storage between session, cookies and localstorage?
Where is the storage location of each of them? the local storage I heard it’s from html5 and it’s better that session and cookie, what the difference between them?…
-
2
votes2
answers434
viewsHow to know if a person has visited a page in the last 2 days
I have an idea, to show advertising only to those who have visited the site before, and another ad for those who have never visited before. (LAST 2 DAYS) SOMETHING LIKE THAT: <?php if ($visitou =…
-
2
votes0
answers487
viewsError: Could not Decode flash data from incoming cookie value Invalid characters in decrypted value[...]
How do I resolve this Hibernate error? It is specified as Grave: JSF1094: Could not Decode flash data from incoming cookie value Invalid characters in decrypted value. Processing will continue, but…
-
2
votes1
answer277
viewsCheck if cookies exist in ASPNET CORE
I’m migrating from the Asp.net Webforms to the Core 2.2 and in the application, we stored information such as Id, and other parameters. In Asp.Net Core I use Seguinte Iactionresult to record the…
-
2
votes3
answers41
viewsAssign new items in an array without rewriting the whole code
Is there any way to add new items without rewriting the code ? See: If there are cookies then I use CURLOPT_COOKIE If not, I don’t use: if ($cookies) { $options = [ CURLOPT_URL => $url,…
-
2
votes1
answer34
viewsASP.NET Core: session duration
I did a program in ASP.NET Core MVC, which has the class Startup as: public class Startup { public Startup(IConfiguration configuration) { Configuration = configuration; } public IConfiguration…
-
1
votes2
answers312
viewsStore Click on cookie
I have searched here for the site and found nothing that could really help me. I believe some of you can help me. The following is, I created a link that takes the ID of 'x' post through GET and…
-
1
votes1
answer243
viewsGet cookies/browser
i know java provides us the possibility to manipulate cookies, but there goes the question. is it possible to obtain cookies from the web browser ? if yes, from which method ?
-
1
votes1
answer192
viewsSession error on httpclient android
I am trying to make an application to log into the college website, and through Crawler I work the information returned by httpclient. Note: I am doing for learning, I started recently in java. I do…
-
1
votes1
answer50
viewsCookie between controllers
I created the following cookie in the Locale controller: $cookie = new \Zend\Http\Header\SetCookie('localidade_id', $localidade->getIdentificador(), time() + 3600); However, when trying to access…
-
1
votes0
answers70
viewsHow do I set up Java Httpclient to accept Javascript and Cookies?
I need my Httpclient return to be able to run a Javascript and load cookies inside it, someone knows how to configure it so this can be possible? Grateful
-
1
votes0
answers93
viewsAndroid - Httpurlconnection cookie
I have a native login screen on android, which the user enters login and password, and does a check via Httpurlconnection if the data is correct, if yes then it saves the cookie, and returns that…
-
1
votes0
answers478
viewsPicking up http request cookies
Good afternoon, I am having trouble picking up cookies when I make an http request for a particular address. Using firefox+firebug I see 5 cookies. Already through my Java program I can only see 1…
-
1
votes2
answers616
viewsStore login input text
Guys I’m needing to record 2 fields from the login screen of my program, I want to give ease to the friend who has logged in, he does not need to type things like company code, and email. I tried to…
-
1
votes3
answers1624
viewsPlace an Array in a PHP cookie
I have a query that returns the accesses of the user who just logged in. I need to turn them into an array and store them in a session and a cookie. Follow code: //ARMAZENA AS PERMISSOES DO PERFIL…
-
1
votes0
answers231
viewsStore video session inside Session or php cookie
How do I store the time of viewing a video (Html5) in a Session or cookie with php? The idea is to create a mini video platform, and to store the runtime within a cookie | Session, and when the user…
-
1
votes1
answer98
views -
1
votes2
answers317
viewsPersonalize PHP session cookie
I’m using a Handler customized to save sessions on MongoDB and a custom class to create cookies attribute-ridden SameSite using the function header(), although this specification is not widely…
-
1
votes0
answers206
viewsHow to identify the user in Ratchet PHP
I’m creating a multi-room chat with websockets, using PHP Ratchet. The framework itself facilitates the process of identifying the user, seeking his name through cookies, as can be observed here:…
-
1
votes0
answers372
viewsPopunder that opens every 20min per IP
I need a popunder for my website that opens every 20 minutes. I am using a code, but this only allows it to be opened 1 single time... var tags = document.getElementsByTagName("a"); for (i = 0; i…
-
1
votes1
answer38
viewsStylesheet with cookie works only the second time
I have a site that the style is set by the cookie "standard" or "dark" However, if you enter it the first time it saves the cookie with "default" value, but it does not take the style. It only works…
-
1
votes1
answer70
viewsPHP - Sessions and cookies
I have a page login.php which after being filled goes to the processa.php and then enter the session and cookie: $cookie_name = "Administrador"; $cookie_value = $id; setcookie($cookie_name,…
-
1
votes1
answer55
viewsGet only part of the Cookie string
I have the cookie: twid that is returning like this in the browser. %22u%3D859186139894337536%22 I’d like to take just this: 859186139894337536 It is possible to do so in PHP. PS: I’m getting it…
-
1
votes0
answers26
viewsGoogle Analytics and cookies
My question is, I’m developing a website and I intend to monitor the Analytics with Google Analytics, however I have been reading some articles about cookies and did not understand if I need to…
-
1
votes1
answer98
viewsHow to save sessions in the browser
How to record sessions in the browser with php. Currently I have a login system, and always validates [$_SESSIONS] existing in the browser, but every time I close and open the browser again, the…
-
1
votes1
answer34
viewsListening to an event in cookies
I’m developing an application to be used in two browser tabs. Eventually a tab modifies a cookie, so I need to refresh the other tab to load the correct information. That way you can listen to a…
-
1
votes1
answer179
viewsHow to Rank in a List, The Most Accessed Table Link
I am creating a dynamic table in Javascript to represent a set of favorite links that will be managed through HTML document. Example document.getElementById('resultado').innerHTML =[…
-
1
votes0
answers285
viewsHow to unset a coockie when closing the browser
In PHP I am creating a login coockie like this: $data = "e".gmdate("dmY"); setcookie("elogado", $data, time() + 600, "/"); When I close the browser and reopen, will I check the coockie like this:…
-
1
votes0
answers26
viewsComo disability via Javascript que os cookies carregauem dados em apenas uma página especificas
I have a registration page that has email and password, when the user clicks to save email and password in the login, the auto fill of the coockies already fill the registration data. I can’t clean…
-
1
votes0
answers32
viewsCookie path does not work
I create a cookie with javascript, until then beauty, but when I use the path it simply stops working, so it works: document.cookie="gravado=sim"; the problem is that this way I can’t access it by…
-
1
votes1
answer365
viewsJavascript redirect and set cookies
I have the following code with Javascript <script type="text/javascript"> $(function() { $("#loginForm").submit(function(event) { $("#success").css("display", "block"),…
-
1
votes0
answers76
viewsHow to execute a script after 5 visits from a single user to the page using cookies
My website uses a anti-adblock that prevents people from entering, but no one likes to see advertisements, so I decided to go after a way to let new visitors use the site a few times before the…
-
1
votes1
answer87
viewsSave page status without refresh, after expireSession
Here checks if you are logged in public function isLogged() { if (isset($_SESSION['ccUser']) && !empty($_SESSION['ccUser'])) { if ($_SESSION['registro']) { $segundos = time() -…