资 源 简 介
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. You can install the extension from https://addons.mozilla.org/en-US/firefox/addon/jsbloat/.
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:
http://jquery.com/
http:/