Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 5 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.