• @[email protected]
    link
    fedilink
    English
    22 years ago

    How does YouTube know whether I’m blocking or not if it all happens at the client side?

    • @[email protected]
      link
      fedilink
      English
      42 years ago

      They make a test request from the client and check it’s received on the server end and returns what they expect on the client end at a guess. Basically they try to load an ad and if they don’t see the request on the server, or the client doesn’t get the sort of data it expects, it assumes you’re ad blocking.

    • Skull giver
      link
      fedilink
      English
      12 years ago

      There are many ways. Something I’ve come up with just now:

      Put a few blocks of information encoded in the video of the ad itself. Require that block of information as a key to watch the next video on Youtube. No key, no videos. Extract the key by reading the video data as it plays from the client side. Stream the ad at only half a second at a time, so it’s never fully in the clients buffer.

      Theoretically an addon could block the video for 30 seconds and just slow a blank screen, but it’d be impossible to block the ad without interruptions.

      Less complicated anti ad block scripts are out there. Simply serving an important piece of Javascript from a host and filename that would normally look like an ad would probably trick the adblocker into blocking it. If that bit of script takes care of making the video play and the default HTML on the page says “no adblock plz” you’re already there.

      Detecting adblock isn’t hard, and preventing users with adblock isn’t either. It requires constant attention from Google programmers though, which is quite expensive.

      They don’t need to catch all ad block either. They just need to catch enough people enough times that paying for their video services is more comfortable to them than running adblock or accepting ads.

      • @[email protected]
        link
        fedilink
        English
        12 years ago

        Put a few blocks of information encoded in the video of the ad itself. Require that block of information as a key to watch the next video on Youtube.

        Interesting. But it probably only takes less than a few seconds for a program to scan a 30s video file and extract that bit of information.

        • Skull giver
          link
          fedilink
          English
          12 years ago

          That’s why you’d need to stream the ad one second at a time so you can’t scan the full file. Whether you’re watching an ad or not, you’d be waiting for the ad to finish.

          Of course this is a rather naive idea, but it just shows how one might go about accomplishing this. I’m sure Google’s programmers can come up with much better solutions.