| 1 | # Content Analysis |
| 2 | |
| 3 | `goproxy-jquery-version` starts an HTTP proxy on :8080. It checks HTML |
| 4 | responses, looks for scripts referencing jQuery library and emits warnings if |
| 5 | different versions of the library are being used for a given host. |
| 6 | |
| 7 | Start it in one shell: |
| 8 | |
| 9 | ```sh |
| 10 | goproxy-jquery-version |
| 11 | ``` |
| 12 | |
| 13 | Fetch goproxy homepage in another: |
| 14 | |
| 15 | ```sh |
| 16 | http_proxy=http://127.0.0.1:8080 wget -O - \ |
| 17 | http://ripper234.com/p/introducing-goproxy-light-http-proxy/ |
| 18 | ``` |
| 19 | |
| 20 | Goproxy homepage uses jQuery and a mix of plugins. First the proxy reports the |
| 21 | first use of jQuery it detects for the domain. Then, because the regular |
| 22 | expression matching the jQuery sources is imprecise, it reports a mismatch with |
| 23 | a plugin reference: |
| 24 | |
| 25 | ```sh |
| 26 | 2015/04/11 11:23:02 [001] WARN: ripper234.com uses //ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js |
| 27 | 2015/04/11 11:23:02 [001] WARN: In http://ripper234.com/p/introducing-goproxy-light-http-proxy/, \ |
| 28 | Contradicting jqueries //ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js \ |
| 29 | http://ripper234.wpengine.netdna-cdn.com/wp-content/plugins/wp-ajax-edit-comments/js/jquery.colorbox.min.js?ver=5.0.36 |
| 30 | ``` |
| 31 |