Barry,
No, all you need to know is a little javascript.
First, a cookie is only accessable to the domain(HTTP_REFERER) that created
it. When a browser asks for a page all cookies owned by domain are sent to
the browser and stored as an object named "document.cookie". Though they
are stored differently by NS and IE the JS is the same.
When you give a value to document.cookie the cookie is updated, if the
cookie does not exist it is created. If you want the cookie to remain after
the browser is killed you MUST specify an expires element. See, you can
track a user from page to page and tailor content to them based on previous
pages and leave not a trace. :-)
To delete a cookie expires=aDateEarlierThanNow. I think IE will choke on
UNIX born on dates.
The first thing to do is check for a cookie...
function CheckCookie(){
if (document.cookie) { // if true get the one we want from the cookie object
index=document.cookie.indexOf(num_visits); // learn about indexOf object
}else{ // set a cookie
index=no_cookie;
document.cookie = "num_visits=1; expires=Expires_On;";
}
}
your document.cookie would look like this..
index=num_visits=1;expires=Sunday,09-Aug-199800:00:00 GMT
assuming that Expires_On=My_Birthday, ;-)
You are limited to 20 cookies per domain and browsers(AFAIK) can store a
max of 300 and 4K is the size limit for any one cookie. I found it easier
to keep everything in the cookie name(the first element, and required-can't
have an unlabeled cookie nor can it be labeled one of the 4 other
elements-expires-path-domain-secure). Yes, you can set a cookie for another
domain then redirect or refresh there. This would be the correct way to use
a cookie for partnering sales.
A little warning.. the cookie file is editable so don't use something
like...member=NO unless you want someone to edit it to member=YES and
return to your site. Don't rely on a cookie for access, authentication, or
security alone, you will get burned.
Ron
At 08:14 PM 7/20/98 -0500, Peter J. Schoenster wrote:
>> > However, I also believe that one must have a high level of access to the
>> > web server to set this up. That is, the 'typical' web hosting account
>> > will not allow you access to the server to set up this cookie
>> > implementation. Is that correct?
>
____________________________________________________________________
--------------------------------------------------------------------
Join The Web Consultants Association : Register on our web site Now
Web Consultants Web Site : http://just4u.com/webconsultants
If you lose the instructions All subscription/unsubscribing can be done
directly from our website for all our lists.
---------------------------------------------------------------------