• How do this work? Using session or cookies – the use I require is on site entry – ask for age, able to view same page again (without asking again)

    BUT… if user exits the site and then returns it has to verify again – this I think, is session.

    If its cookie based…… (that is not good – users with lower ages can view, because cookie is envoked)

    Or… is there some settings to accomplish this?

Viewing 1 replies (of 1 total)
  • Plugin Author Phil

    (@philsbury)

    Hi @idaryl,

    Age Gate, like all of WordPress, uses cookies rather than sessions.

    What you describe with a user exiting the site and returning would work the same in a cookie or session setup depending on how their browser classes and end of session (on Mac, it would be when the browser is quit rather than the window closed for example).

    Visiting another site and returning, the session or cookie would both be maintained in most cases. Think how the admin for WP works, if you login, go somewhere else and come back you’ll still be logged in, at least for a time period.

    However, it could be possible to clear the age gate cookie via javascript as someone leaves the site using the beforeunload event. I’d need to look into it and test though to be 100% sure it’s work. <- this wouldn’t work as it would remove the cookies (or session) every time you navigated between any page of your site and the is no way to determine the new URL in the unload event.

    Hope that helps to an extent

    Thanks
    Phil

    • This reply was modified 6 years, 2 months ago by Phil.
    • This reply was modified 6 years, 2 months ago by Phil.
Viewing 1 replies (of 1 total)
  • The topic ‘Session or Cookies – Expirateion’ is closed to new replies.