logoalt Hacker News

cogman10yesterday at 3:11 PM5 repliesview on HN

And honestly, all these should ultimately just be done client side in the browser. After the browser has verified "User is x or user is over 21" there's no reason to then send that information to the website.

Let websites issue a "window.isUserOver(16)" call once and then move forward based on the response to that query.


Replies

drdexebtjlyesterday at 8:55 PM

No, no. Don’t give websites a way to check the user’s age.

Age restrictions are different across countries and cultures. Parents disagree on age ratings given by boards all the time.

Have apps and websites declare the objectionable content they have, and let the device decide if it will show it or not according to parental controls.

If you’re a parent that pays attention to age ratings, you know exactly what I’m talking about. The age is meaningless. It’s the type of content next to the rating that’s important.

Your only option as a parent now to let your 14 year old play a violent game rated M that you specifically allowed is to give them a fully unrestricted device. They can now use that device to access gore, porn and gambling as well. How does this make any sense?

autoexecyesterday at 7:23 PM

Don't even bother having the website ask the browser anything at all. Just have the website TELL the browser the content is intended for adults via HTTP header and let the browser decide to display it or not depending on parental controls.

show 1 reply
Wowfunhappyyesterday at 4:22 PM

This would require browser attestation, wouldn't it? Otherwise kids are just going to download a custom build of Chromium where `window.isUserOver(16)` is always `True`.

show 3 replies
mminer237yesterday at 3:24 PM

This is how California is legislating it—requiring the OS to let an admin set the user's age, then let browsers and through them, websites, to query that setting.

inigyouyesterday at 4:14 PM

You can get their exact age by binary search.

show 1 reply