I'd prefer the HTTP header be on the response. That way, it can't be used for fingerprinting and can easily put the website in a more fine grained category (e.g., porn, gore, political extremism) and the user agent can be configured to filter based on this. You could then create limited but present liability for mislabeling.

I'd be worried that doing that would invite bad followups - e.g. requiring web browsers to block tagged content by default (or always), defining LGBT or other politically sensitive content as pornographic and mandating that it be tagged, penalizing web site operators for failing to tag their web sites, etc.

But in principle, I still agree. As someone who has managed some adult-oriented spaces online, I would love to have a way to put a sign on the door that, in effect, says "adults only", and have it be technically enforced for users who have chosen to do so.

This is another reason to do it as a header -- you can make lgbt its own category, instead of pretending that it's porn. This isn't perfect though, since children need to be able to learn about that even if their parents are bigots. The child could themselves be lgbt, and honest information instead of rumors of taboo can help them not develop similar bigotry.

You’d have to come up with a technical spec on the category definitions though. For example, what is porn and what is political extremism? That has always been the struggle.

How about a header giving the minimum age.