*7/27/2013 UPDATE – I have received so many inquiries and questions on this topic that I’ve decided to turn this in to a service that I offer. Please go to http://age-verify.com for complete details.
Currently I am in the midst of a fair amount of work for Elysian Brewing. The most recent piece in place is an age verification script that is a simple yes / no question to the user which sets a session cookie and then directs them accordingly. Sounds simple right? Well, not as simple as you might think.
Considerations and Requirements
- This is a pretty big site and changing the site root index.html page to be the actual verification page would mean the undoing of established search engine results and crawl data.
- Even if I did use the site root page for age verification, every page on the site (not to mention external links), would need to have the link back to root updated with a new location if the page extension were to change.
- I want to prompt for the age verification regardless of what page the site visitor first gets to. They may not necessarily come in at the site root, but rather from a blog posting, searching for a brewery location, beer profile page, etc.
- I only want users to be prompted once per site visit, but not every time they navigate to a different page within the site.
- To accomplish #3 and #4, I’ll need to set a session cookie with a server side language such as PHP.
- I don’t want to change any of my page extensions from .html to .php for the same reason listed above in item #2.
Check out the Elysian Brewing website to see this live and in action. Elysian Brewing