Browser fingerprinting is an invasive and opaque stateless tracking\ntechnique. Browser vendors, academics, and standards bodies have long struggled\nto provide meaningful protections against browser fingerprinting that are both\naccurate and do not degrade user experience. We propose FP-Inspector, a machine\nlearning based syntactic-semantic approach to accurately detect browser\nfingerprinting. We show that FP-Inspector performs well, allowing us to detect\n26% more fingerprinting scripts than the state-of-the-art. We show that an\nAPI-level fingerprinting countermeasure, built upon FP-Inspector, helps reduce\nwebsite breakage by a factor of 2. We use FP-Inspector to perform a measurement\nstudy of browser fingerprinting on top-100K websites. We find that browser\nfingerprinting is now present on more than 10% of the top-100K websites and\nover a quarter of the top-10K websites. We also discover previously unreported\nuses of JavaScript APIs by fingerprinting scripts suggesting that they are\nlooking to exploit APIs in new and unexpected ways.\n