Net Gains (Oct 02, 98)
Note: All external links mentioned in this article were working when published, but some may no longer be active.
Informative cookies
Here is some code I found to create cookies using Javascript. This code uses Persistent Client State HTTP Cookies to store information about how many times the browser has visited this page and when was the last time the broswer loaded the page. This example stores the two cookies on the reader's hard disk including how many times the page has been viewed by this browser and the date of the last visit.
Here is an example of how this can be used:Hello, !
Reload this page to see this change.
How to use this Javascript:
Include the Javascripting included in the head of this document.
Make sure you rename the constants'lc_LastVisit'
and 'lc_NumVisits'
in Javascript are something unique for your page. If you do not then other pages that use this code will interfere with your count and date.To output the text, use this code inside the BODY section to display the information in the browser: <SCRIPT LANGUAGE="JavaScript">
<!--
document.write (GetLastVisit())
</SCRIPT>
Back to Net Gains 1998 archives.
© Lyndon Cerejo: email | www.strategist.net | search site | sitemap