ASP - Cookies Habilitadas

 
Vista:

Cookies Habilitadas

Publicado por pedro moreno (8 intervenciones) el 31/05/2002 12:04:02
Alguien sabe como saber si el cliente que accesa a mi pagina tiene las cookies de su navegador habilitadas?
Hay alguna funcion o Componente?
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:Cookies Habilitadas

Publicado por Avatar (150 intervenciones) el 31/05/2002 21:30:58
Te paso un ejemplo:

<html>
<head>
<script language="JavaScript"><!--

// Como saber si el cliente tiene la opcion de cookies habilitada

// [email protected]

rhrn = new Date();
rhrnt1 = rhrn.getTime();
rhrns1 = rhrn.getSeconds();
rhrnm1 = rhrn.getMinutes();
rhrnh1 = rhrn.getHours();

// this is arbitrary - it just looks like a normal cookie
cookievar1 = "AE87BC5C097ADD230B543BCD8" + rhrnh1 + rhrnm1 + rhrns1;
SetCookie ('tracker_id', cookievar1, 56);

if (GetCookie('tracker_id') == cookievar1)
{
rhrn2 = new Date();
rhrnt2 = rhrn2.getTime();
}
else
{
rhrnt2 = 0
}

if (rhrnt2 < (rhrnt1 + 300) && rhrnt2 > 0)
{
cookStatus = "You have cookies automatically enabled";
}
else
{
if (rhrnt2 == 0)
{
cookStatus = "You have cookies disabled";
}
else
{
cookStatus = "You are clicking yes to cookies manually";
}
}
function GetCookie(cookieName)
{
var theCookie=""+document.cookie;
var ind=theCookie.indexOf(cookieName);
if (ind==-1 || cookieName=="") return null;
var ind1=theCookie.indexOf(';',ind);
if (ind1==-1) ind1=theCookie.length;
return unescape(theCookie.substring(ind+cookieName.length+1,ind1));
}
function SetCookie(cookieName,cookieValue,nDays)
{
var today = new
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:Cookies Habilitadas

Publicado por pedro moreno (8 intervenciones) el 01/06/2002 11:46:49

Entonces no hay manera de hacerlo con ASP?
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:Cookies Habilitadas

Publicado por Avatar (150 intervenciones) el 03/06/2002 22:05:13
La verdad me parece que no porque como la opcion de cookies se refiere al cliente, en ASP no hay manera de acceder a esas opciones. Solo el Javascript puede.

Saludos mortales...

The Great Avatar
May the 8th Virtudes be with you
-------------------------------------
[email protected]
[email protected]
ICQ: 28864859
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar