Only Popup Once 2

By JavaScriptSource Staff on Sep 3, 1999


If you have a popup window which opens on your home page every time a visitor returns, it can become very annoying. Using cookies, this script can determine if the visitor has been here before, and only open a new window on their first visit to the page. The next time they come back, the script will read the cookie, identify them as a repeat visitor, and not open the window again.

[ Reload the page and you’ll notice that the popup window doesn’t open again. ]


  • Posted: September 03, 1999

Source Code

Paste this source code into the designated areas.

External file

Paste this code into an external JavaScript file named: onlyPopupOnce.js


Paste this code into the HEAD section of your HTML document.