Sometimes people need to show some important information or Facebook likebox or advertisement or newsletter signup on popup when the website loads, without opening in a separate window. This can be achieved using the jQuery. Further these popup should not be popping every time the user browses various pages from the same website. So to prevent this we can use cookie or session check.
Here are two jQuery popup examples that will automatically loads on website visit.
1. First one uses PHP session to load it only once during the total browsing session, to see the popup again in action, close the browser and visit the demo link.
2. Second one is based on Simple jQuery Popup by Nikita Lebedev. This example uses PHP cookie to load it only once until the cookie session expires. In this demo cookie has been set for 1 minute, so popup won’t appear within 1 minute even if you refresh the page.