Home | Legacy Firefox Extensions | Content Policy | Contact



JsBloat is a Firefox extension that helps determine what fraction of the jQuery library a web page uses. It heavily leverages JSCoverage, an open-source code coverage tool for JavaScript.

JsBloat works by intercepting requests to the jQuery library loaded from ajax.googleapis.com. Instead of returning the requested code, JsBloat injects an instrumented version of jQuery that can be processed by JSCoverage. If JsBloat intercepts a request on the page, it inserts a Show JSCoverage results button in the upper-left-hand corner of the page. Clicking the button will overlay an iframe with the JSCoverage UI.

Examples of pages where you can see JsBloat in action (once you have the extension installed) are:
If your web page loads jQuery from someplace other than ajax.googleapis.com, then you can also update a setting in about:config. For example, http://getfirefox.com/ loads jQuery from http://mozcom-cdn.mozilla.net/js/jquery/jquery.min.js (apparently with the wrong MIME type), so if you go to about:config and set extensions.jsbloat.overrides to:

{"mozcom-cdn.mozilla.net/js/jquery/jquery.min.js": "jquery-1.4.4.js"}

and then you reload http://getfirefox.com/, you should see the Show JSCoverage results button in the upper-left-hand corner, indicating that JsBloat was able to intercept the request to http://mozcom-cdn.mozilla.net/js/jquery/jquery.min.js.

Important items regarding setting the preference:
The source code for JsBloat is available at http://code.google.com/p/jsbloat/.

Download files:


This page is part of the LegacyCollector website.
Disclaimer: All material on this site is property of their respective owners and available under
open licenses to the best of our knowledge. If you are an author and would like anything removed,
then please write an e-mail to legacy [at] collector dot org.