A_tom Posted April 21 Posted April 21 I want to be able to force visitors to my website to visit and acknowledge a disclaimer on the first time they visit, after which they will never see it again. Searching, I have found a couple of examples, neither of which seem to do what I want. <script> $(document).ready(function(){ if(!$.cookie('welcomeMsg')){ $(".top").show(); $.cookie('welcomeMsg', 'Y', { expires: 365*3 }); } }); </script> and <script> if (localStorage.getItem("visited")) { window.location.href = "OneTimePage.html"; } localStorage.setItem("visited", "true"); </script>
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now