Introduction to cookie| Beginners
====================================
The problem is that I want to resolve the automatic access http://www.thehungersite.com. This page can limit your access to it once every day (don't forget to click on this link).
So far, the first thing I did at the beginning was to manually select my bookmarks to load this page.
Why not create a simple script for it?
Because I wanted it to work the same way under Netscape and IE, I started learning JavaScript.
Solve
====================================
The theme is simple: Create a page and test if today's page has been loaded,
If it is not loaded, it is linked to http://www.thehungersite.com through it and set
This page serves as the homepage of the browser.
Getting the page and redirecting it is easy, and the question is how to remember that the page has been accessed.
Because JavaScript has no access to files, it seems we can only use cookies.
Cookies are a variable with a size limit, which is associated with a server's domain name,
By default, the lifetime of a cookie is emptied when the browser is closed (note: not when you leave
This page, but you can use a script to change the situation,
After the user closes the browser to enable cookies to be stored, Netscape in the file using all the
Cookies, and IE stores each cookie separately. In addition, different browsers bring some intent
Not, you have to determine whether a user has the cookies turned off in its browser settings.
Everything's fine and good, but now I haven't tested it in IE, calling the sample JavaScript statement:
Cookieexpires = "01-apr-" + nlyear + "GMT";
Document.cookies = cookiename + "=" + Cookievalue + "; expires= "+ cookieexpires;
and then call
document.write (Document.cookie);
The Document.cookie is empty.
------------------------------------------