Questions tagged as 'cookies'

1
answer

Saving data for a while

Is there any way I can use the javascript cookies to store information for 3 hours for example? In my scenario, I need to have a warning page, but I do not need to save those records to the database. I need these warnings to remain for at l...
asked by 18.12.2014 / 18:32
2
answers

How to create a Javascript cookie?

I want to do the following 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 GerarCookie(nome,valor,tempo) . Now, how to...
asked by 25.02.2016 / 00:22
1
answer

Save div into a cookie

I'm starting to mess with cookies, so I do not know much. I was wanting him to save a certain <div> but I do not know how to do it. How do I do: Verify that that cookie exists: $nomecoook = $_GET['cont']; if(isset($_COOKIE[$...
asked by 06.08.2018 / 20:32
1
answer

Stylesheet with cookie works only the second time

I have a site that style is defined by the "default" or "cookie" cookie However, if you enter the first time on it it saves the cookie with the default value, but does not assume the style. It only works when you reload the page. On the...
asked by 11.03.2016 / 04:36
1
answer

How to Rank in a List, The Most Accessed Table Link

I'm creating a PivotTable in Javascript to represent a set of favorite links that will be managed through HTML document. Example document.getElementById('resultado').innerHTML =[ '<table>', '<tr>', '<th>ID</th...
asked by 21.07.2016 / 03:53
1
answer

Get cookies / web browser

I know that java gives us the ability to manipulate cookies, but there goes the question. Is it possible to get cookies from the web browser? if yes, from which method?     
asked by 24.11.2014 / 05:25
1
answer

Remove Cookie when closing 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 it is the first time the user opened the application, follow the code: window.onload = function() {...
asked by 13.08.2018 / 15:45
2
answers

How to use cookies in javascript

I create cookies in JavaScript, but I do not know how to apply them to some project. Could anyone post an example of how to use cookies?     
asked by 06.01.2018 / 19:24
1
answer

Save page status without refresh, after session expires

Here you can check if you are logged in public function isLogged() { if (isset($_SESSION['ccUser']) && !empty($_SESSION['ccUser'])) { if ($_SESSION['registro']) { $segundos = time() - $_SESSION['registro'];...
asked by 12.01.2018 / 20:11
1
answer

Cookie between controllers

I created the following cookie in the controller Location: $cookie = new \Zend\Http\Header\SetCookie('localidade_id', $localidade->getIdentificador(), time() + 3600); However, when trying to access it in the controller Contact:...
asked by 17.03.2015 / 13:54