• heartlessevil@lemmy.one
    link
    fedilink
    English
    arrow-up
    9
    ·
    edit-2
    1 year ago

    There are numerous ways to detect ad-blockers. The most robust way is to default to assuming the user has an ad blocker (fail-safe design), loads an ad script, and the ad script continues loading the page (video, article content, etc). If the ad script is blocked, the page will stop loading, and the default adblock state will be rendered.

    A more brittle option is to load the ad script with an error handler (or detect if it is blocked via a timing attack) and then the error handler changes the page to reflect the ad script was blocked. The reason this is more brittle is that the user can simply intercept and remove the error handler. (In contrast to the above approach, this is fail-deadly design.)

    • ArtZuron@beehaw.org
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      Some websites load the ads before the page itself, which seems to get around many adblockers. Or at least I’ve heard some folks say that. Can’t say for certain, though my adblocker doesn’t seem to work at all on some sites, and that could be why.

      • amanneedsamaid@sopuli.xyz
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        Youtube could bake the ads into the video stream to make them unskippable. This still wouldn’t stop frontend technologies like Invidious from scraping.