I'm building a website for a EU company that sells beer, and need an age verification splash screen. That's quite easy, and I have one in place already. I use a lightweight cookie plugin ([cookie.js](https://github.com/js-coder/cookie.js) found on the excellent <http://microjs.com>) in the page header. This is more or less my set up:

JS (in `<head>` element)

```
if (cookie.get("agechecked")) {
    document.documentElement.className += " agechecked";
}

```

CSS

```
.agechecker { display: block; width: 100%; height: 100%; ... } 
.agechecked .agechecker { display: none };

```

Sadly, for few visitors the agecheck doesn't work properly. Some can't get past it, for others it pops up after every page load, and for some, cookies just don't work which means the checkbox 'remember me' is broken to them. I want to use an alternative route to at least make sure the agecheck doesn't prevent anyone from viewing the site completely.

I only have javascript to my disposal and don't want to use cookies. Since I'm quite sure the equivalent to a session is a cookie that expires after the browser closes - so that kind of limits my options to... yeah, what?

Alternatives I'm considering:

* [jStorage](http://www.jstorage.info/) - but that relies on a framework such as jQuery or Prototype, meaning I'd have to load jQuery in the page header. That won't do;
* The `window.name` method, combined with JSON to store data in the window `name` property, which is a bit too hacky for my taste, and also doesn't carry over to other tabs
* I could check the referer (was the visitor already on another page on this domain?) which is a 90% guarantee he/she got through the agecheck

I couldn't find any real useful information here on stackoverflow, but I'm sure some of you have built age verifications. How did you solve these issues?

(edit: I know, I should build a form that actually posts to the server where I can store and retrieve information in a gazillion different manners, but just take it from me I have to rely on javascript. Can't help it)