<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1012060" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1012060</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/registration-cookies#comment-1069545</link>
    <description> &lt;p&gt;Are you sure you want to use JavaScript for this?  I&#039;d use a server side language.&lt;/p&gt;
&lt;p&gt;Javascript isn&#039;t my thing either, but I have a book (which I haven&#039;t really read)...&lt;/p&gt;
&lt;p&gt;Format:&lt;br /&gt;
cookieName=cookieValue; expires=expirationDateGMT; path=URLpath; domain=siteDomain&lt;/p&gt;
&lt;p&gt;Save a cookie:&lt;br /&gt;
document.cookie=&quot;cookieName=cookieValue; expires=expirationDateGMT; path=URLpath; domain=siteDomain&quot;&lt;/p&gt;
&lt;p&gt;Get cookie:&lt;br /&gt;
document.cookie.split(&quot;=&quot;)[1]  //returns cookieValue&lt;/p&gt;
&lt;p&gt;After login, try:&lt;br /&gt;
expireDate = new Date&lt;br /&gt;
expireDate.setMonth(expireDate.getMonth()+6)&lt;br /&gt;
document.cookie=&quot;Registered=YES; expires=&quot;+expireDate.toGMTString() &lt;/p&gt;
&lt;p&gt;For return visits, try something like this:&lt;br /&gt;
if (document.cookie.split(&quot;=&quot;)[1] == &quot;YES&quot;) {&lt;br /&gt;
document.location=&quot;http://your.com&quot;&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;Haven&#039;t tested this myself.  This should create a cookie that expires in six months.  When the person returns, they &#039;should&#039; be forwarded to &#039;http://your.com&#039;&lt;/p&gt;
 </description>
     <pubDate>Wed, 16 Aug 2000 00:39:28 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1069545 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
