The code we unwittingly run

This will come as no news to tech-savvy people, but when you open a webpage, you are running a metric shit-ton of code from all over the Internet.
A bunch of garbage nobody needs.
A bunch of garbage nobody needs.
Since I’ve been doing some Chrome Extension development over the past couple of days, I’ve been opening up the dev tools that let you see the “console” output of all the javascript that runs on a page. It’s a lot. I have an ad-blocker running, so most of those GETs and POSTs generate error messages and go nowhere. But there are a lot of them. And the code keeps trying over and over.
And it’s from a lot companies, too. On the NYT alone, I get messages from various systems from google, amazon, facebook, doubleclick, moatads.com, brealtime.com.
Aside from the privacy and tracking aspects, it feels like a theft of resources, too. They’re using my CPU to do work that has nothing to do with rendering their page.

2 thoughts on “The code we unwittingly run”

  1. So this is why my old iPad hangs up on scripts from the NYT (or LGM or FB). But the error calls don’t take up much time, do they? And does this spell the end of advertising as we (now) know it? Hope so.

  2. There are a couple of things that can happen with all this code. It can:

    1. just take a long time to run
    2. not be too expensive but frequently “block” on external events, such as waiting for an external resource (eg, an ad) to load. The code is not taking the time, but it is holding a thread until the resource is ready, thus delaying your page from rendering
    3. error and crash

    Most of the ad-blockers essentially work by turning scenario 2 into scenario 3. Three is superior, since you did not care about the correct operation of the ad code anyway.

    Is it the end of advertising? Not on your life. As it is now, many sites are now essentially delivering the content dynamically, same as the ads, and won’t actually even send the content until they have heard back from their scripts that the ads have actually been downloaded and displayed. So you see, it’s going to get much, much worse.

Leave a Reply

Your email address will not be published. Required fields are marked *