Does selectively blocking Javascript in Chrome actually reduce bandwidth usage?

5

1

In Chrome, Javascript is allowed to run by default. However, there's a nice dialog (Settings → Show advanced settings... → Content settings...) for blocking Javascript from specific sites:

enter image description here

My question: at what layer is this blocking being done? Does blocking Javascript in this manner prevent the scripts from actually being downloaded (thus reducing bandwidth usage), or does it merely prevent the blocked scripts from running?

nc4pk

Posted 2013-09-22T01:49:53.760

Reputation: 8 261

Answers

7

Yes, it does save bandwidth and this is easily verifiable by looking at the Network tab of Tools > Developer tools in Chrome. When you block JavaScript for a site, Chrome simply doesn't download them and thus saves on bandwidth. This is being done at the "Application" layer of the OSI model (you asked about which layer it happened at, so I wasn't sure exactly what you meant, but I assumed you meant the OSI model).

Here are the results for me with JavaScript blocked for SuperUser.com

JavaScript Blocked

Here are the results for me with JavaScript not blocked for SuperUser.com

JavaScript Not Blocked

As you can see, the loading times with JavaScript blocked were less than a second, but with JavaScript enabled, it took around 2 seconds.


It should be noted that in this experiment, I did the "with JavaScript blocked" test first, and had never gone to SuperUser.com in Chrome before. I did the "with JavaScript not blocked" test second.

Drew Chapin

Posted 2013-09-22T01:49:53.760

Reputation: 4 839