I know that this is a rather simplistic question, but I want to create a cookie that will redirect a visitor (on their 2nd visit to the webpage) to another page. Basically so that they don't have to see the whole flash show every time they come to the webpage (they just see it the 1st time). I know that this is done everywhere...I've looked all over for a script but I've had no luck.
Try this in the head of your page. It checks for a cookie. If it's there, it redirects to index2.html. If the cookie isn't there, it stays on index.html and writes the cookie. Mmmmm....cookies.
<script language="JavaScript">
<!--
if (document.cookie)
{window.location.href="index2.html"}
else
{setCookie('myCookie','oatmeal','Thu, 01-Jan-2010 00:00:01 GMT') }
Bookmarks