# JavaScript Library Detection

**URL:** <https://discuss.httparchive.org/t/javascript-library-detection/955>\
**Category:** Analysis\
**Created:** [May 2, 2017, 9:19pm UTC](https://discuss.httparchive.org/t/javascript-library-detection/955 "2017-05-02T21:19:29Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![rviscomi](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.httparchive.org/rviscomi/32/835_2.png) [@rviscomi](https://discuss.httparchive.org/u/rviscomi)\
**Post date:** [May 10, 2017, 9:49pm UTC](https://discuss.httparchive.org/t/javascript-library-detection/955/2 "2017-05-10T21:49:22Z")

</div>

Let’s dig deeper into the JS library data and try to answer some common questions. I’ll be adding to this thread with different analyses. First up…

## What are the most popular libraries?

```sql
SELECT
  library.value AS library,
  library.count AS volume,
  ROUND(library.count / total.count, 3) AS coverage
FROM
  UNNEST((SELECT APPROX_TOP_COUNT(lib.name, 10) FROM `httparchive.scratchspace.2017_04_15_js_libs` WHERE lib.name IS NOT NULL)) AS library,
  (SELECT COUNT(0) AS count FROM `httparchive.har.2017_04_15_chrome_pages`) AS total
ORDER BY
  volume DESC

```

```
Row	library volume	coverage	 
1	jQuery 394296	0.822	 
2	jQuery UI	104193	0.217	 
3	Modernizr	76339	0.159	 
4	Bootstrap	61711	0.129	 
5	yepnope 54589	0.114	 
6	FlexSlider	39465	0.082	 
7	SWFObject	23054	0.048	 
8	Underscore	19283	0.04	 
9	Google Maps	16091	0.034	 
10	Moment.js	14834	0.031

```

[Run it on BigQuery](https://bigquery.cloud.google.com/savedquery/226352634162:c19b06262b0c4ca39ecd6b0d5123f45e)

Querying for the top 10 libraries shows that jQuery is way out ahead and jQuery UI leads the race behind it.

[![](https://canada1.discourse-cdn.com/flex035/uploads/httparchive/original/1X/8d2b2eed4c9647cb666a940dcea4d22fa442ed75.png)](http://jsfiddle.net/8e5uobnb/4/)  
[http://jsfiddle.net/8e5uobnb/4/](http://jsfiddle.net/8e5uobnb/4/)

Getting more than the top 10 is as easy as changing the `APPROX_TOP_COUNT` arguments. But because jQuery has so much coverage, plotting everything linearly makes the smaller libraries’ data impossible to read.

[![](https://canada1.discourse-cdn.com/flex035/uploads/httparchive/original/1X/1c79d9f06f267530c6c8e5e248882fe01ee386d2.png)](http://jsfiddle.net/8e5uobnb/5/)  
[http://jsfiddle.net/8e5uobnb/5/](http://jsfiddle.net/8e5uobnb/5/)

Plotting the entire data in a logarithmically-scaled chart reveals the long tail.

---

_[View the full topic](https://discuss.httparchive.org/t/javascript-library-detection/955)._
