Questions tagged as 'cookies'

1
answer

What is the difference between cookies and sessionStorage / localStorage?

I understand the difference between localStorage and sessionStorage, but what is the difference between cookies vs local / session? Which has more security, advantages, etc.? Which one is better to use? Greetings and thanks.     
asked by 21.09.2018 / 19:23
3
answers

cookies vs sessions [closed]

I am working on the development of a website and the time has come to start working with cookies. Currently, I use sessions to register users, but I wonder: What are the differences between sessions and cookies? What are its advantag...
asked by 04.06.2017 / 15:21
1
answer

Assign cookies in GET order with XMLHttpRequest

I am trying to assign a cookie in a GET request, in an order XMLHttpRequest . My code is as follows: var pedido = new XMLHttpRequest() pedido.open("GET","https://www.google.com/complete/search") pedido.setRequestHeader("Cookie","SSI...
asked by 21.09.2018 / 18:32
2
answers

Show a div only when you enter the page the first time

I have a div with a message, I want it to be shown only when a visitor enters the page for the first time, if it enters a second time it is not shown. I have this code that I found but it does not work var mensaje = document.cookie.split...
asked by 07.06.2017 / 02:20
1
answer

I do not believe the PHP session

I have a problem with this code .. I receive the cookies correctly but when I want to assign those values to the sessions I do not believe them and I do not know why, any ideas ?? if (isset($_COOKIE["idusuario"]) && isset($_COOKIE["mar...
asked by 07.05.2017 / 19:47
2
answers

does not erase cookies in chrome PHP

It turns out that I have a file salir.php that closes the sessions of the user and also in case the user has marked the option "remember me" the cookies are also deleted .. but in chrome it does not erase the cookies to me then it never leaves...
asked by 11.05.2017 / 07:10
1
answer

'$ _SESSION' in wpwngine

Good afternoon everyone, I have a project in Wordpress where variables session of PHP are used, the migration is being made to the server wpengine , but said server does not allow sessions PHP , I tried to use setcookie()...
asked by 03.05.2018 / 19:55
1
answer

Cookies visitor counter in PHP

I am making a small code in PHP to create a cookie that serves to see if it is the first time you enter a page or what your visit number is. I miss a message that the variable is not declared, I do not know very well how this works of the cookie...
asked by 08.10.2017 / 12:51
0
answers

How can I read the Expires of a cookie?

I have a cookie which is called C__COOK containing a value 1 what I need to do is to be able to read this cookie completely, I mean with this to its property Expires to be able to use its value in a conditional. I...
asked by 05.07.2018 / 19:11
2
answers

problem with cookie and user table mysql php

Hello people I am doing the part of "Keep the session started" in the following way: two cookies are created, one with the user and the other with a series of random numbers (which are a field of the user table) , the problem that I have is that...
asked by 06.05.2017 / 09:17