Detecting Chrome headless
Your solutions in detecting Chrome headless is good.<p>But someone who really wants to do web scraping or anything similar will use a real browser like Firefox or Chrome run it through xvfb and control it using webdriver and maybe expose it through an API. I find these to be almost undetectable.. The only way you can mitigate this is to do more interesting mitigation techniques. Liie IP detection, Captchas, etc.<p>edit: when I say real browser, I mean running the full browser process including extensions etc.