3 ms·
Not really - detecting ad blockers is pretty straightforward, try to insert a DOM node that triggers their ad pattern matching then check if it's been blocked.
by ry_ry 9y ago
Not really - detecting ad blockers is pretty straightforward, try to insert a DOM node that triggers their ad pattern matching then check if it's been blocked.
Not to mention spoofing your user agent is very easy! It's built into the devtools of most desktop browsers (including Edge), or can be modified by a proxy like Fiddler.
I wouldn't ever want to rely on useragent to identify a browser if the idea was to completely block that software from accessing your site.
- eli 9y agoDisagree. As blockers actively try to thwart ad block detection. Especially for popular sites, it's a losing proposition. And Microsoft is never going to ship a browser that completely steals another browser's user agent.
- ry_ry 9y agoIt's a catch 22 really - If adverts are modified or removed, the dom will reflect that. If you completely spoof that you effectively break the dom for everything else. If you only spoof the advert's own properties, you can infer state from other inline elements. If you block domains you can check for their response on the client. If you proxy the incoming asset before it hits the browser and replace it's content is harder to detect client side but the ad provider will be able to see what happened and would most likely not display your modified content, taking you back to the conventional detection strategies.