JavaScript was a mistake

July 22, 2017

The other night I left one of my servers on with a web page up. It was just a little article pertaining to what I was working on before I went to bed.

When I awoke I found the server had locked up. I had left VNC open and I was able to see that the web browser was complaining about unresponsive scripts.

I power cycled the machine, relaunched the browser, and opened dev tools. The page (slowly) loaded, the usual “click here to see more junk“ stuff came up, and then the ads appeared. But the site never stopped loading. It just kept loading more and more things. It just kept downloading endless junk, and none of it for display.

After ten minutes it had made 7,000 requests and downloaded 230 megabytes of crap. This was on a site that was nothing more than just words on page, a glorified blog. Its HTML was 16 kilobytes, of which only 1 kilobyte was the reason I was there.

Leaving the page open over night must have completely filled the machine’s RAM or something, the page’s scripts stuck in an infinite loop of requesting more garbage.

The modern web is such shit. JavaScript is a disease.

Sometimes I wonder how much coal been burned purely because of JavaScript.

I dislike Google AMP, and it’s kind of lame that such a thing even exists. But I’m at the point where if I’m on mobile, I’ll tap on an AMP page first. At least then I know the site has minimal pestilence.