Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
$ varnishlog -i RxHeader -I "(?i)^accept-encoding" | head -n 100000 | cut -c 38- | sort | uniq -c | sort -n | nl
1 1 deflate,gzip,x-gzip,identity,*;q=0.001
2 1 FFFF, FFFFFFF
3 1 FFFF,FFFFFFF,sdch
4 1 gzip,deflate,
5 1 gzip, deflate, sdch, identity
6 1 gzip, x-gzip, deflate, x-deflate, identity
7 1 identity, deflate, gzip
8 2 deflate,gzip
9 2 gzip,defalte
10 2 gzip,deflate,diff
11 2 gzip,deflate,identity,*;q=0.001
12 2 gzip, deflate, x-gzip, x-deflate
13 2 identity,gzip
14 2 none
15 2 sdch
16 2 sdch
17 3 gzip, deflate, base64, quoted-printable
18 3 identity;q=1, *;q=0
19 4 gzip,deflate,lzma
20 4 gzip;q=1.0, deflate;q=0.8, chunked;q=0.6
21 5
22 6 deflate
23 6 gzip
24 6 gzip,deflate,identity
25 7 gzip, deflate, x-gzip, identity; q=0.9
26 7 gzip, identity
27 8 deflate;q=1.0, compress;q=0.5, gzip;q=0.5
28 8 gzip;q=1.0, *;q=0.5
29 10 deflate, gzip, x-gzip, identity, *;q=0
30 16 deflate;q=1.0, compress;q=0.5
31 16 gzip;q=1.0,deflate;q=0.6,identity;q=0.3
32 22 gzip, deflate, compress
33 26 gzip, deflate, identity
34 29 gzip,deflate,gzip
35 40 x-gzip, gzip, deflate
36 55 gzip, deflate, peerdist
37 60 identity,gzip,deflate
38 117 gzip,deflate,lzma,sdch
39 279 identity
40 318 deflate, gzip
41 4473 gzip,deflate
42 25069 gzip
43 26248 gzip,deflate,sdch
44 43130 gzip, deflate
@aeytom

This comment has been minimized.

Copy link

@aeytom aeytom commented May 13, 2020

      1 -   ReqHeader      Accept: application/rss+xml, application/rdf+xml;q=0.8, application/atom+xml;q=0.6, application/xml;q=0.4, text/xml;q=0.4, */*;q=0.2
      1 -   ReqHeader      Accept: application/xml;q=0.9,*/*;q=0.8,text/html,application/xhtml+xml
      1 -   ReqHeader      Accept: image/gif, image/jpeg, image/pjpeg, application/x-ms-application, application/xaml+xml, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
      1 -   ReqHeader      Accept: image/png,image/*;q=0.8,*/*;q=0.5
      2 -   ReqHeader      Accept: application/atom+xml,application/rdf+xml,application/rss+xml,application/x-netcdf,application/xml;q=0.9,text/xml;q=0.2,*/*;q=0.1
      3 -   ReqHeader      Accept: application/atom+xml,application/rss+xml;q=0.9,application/rdf+xml;q=0.8,application/xml;q=0.7,text/xml;q=0.7,*/*;q=0.1
      3 -   ReqHeader      Accept: text/html,application/xhtml+xml,application/xml
      6 -   ReqHeader      Accept: image/gif, image/jpeg, image/pjpeg, application/x-ms-application, application/xaml+xml, application/x-ms-xbap, */*
      6 -   ReqHeader      Accept: text/html, application/xhtml+xml, application/xml; q=0.9, */*; q=0.8
      7 -   ReqHeader      Accept: text/html,*/*; q=0.01
      9 -   ReqHeader      Accept: application/rss+xml
      9 -   ReqHeader      Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
     13 -   ReqHeader      Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
     16 -   ReqHeader      Accept: image/*,/*;q=0.8
     17 -   ReqHeader      Accept: image/webp,image/*,*/*;q=0.8
     18 -   ReqHeader      Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/webp, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1
     19 -   ReqHeader      Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
     21 -   ReqHeader      Accept: image/webp,*/*;q=0.8
     25 -   ReqHeader      Accept: text/javascript, application/javascript, application/ecmascript, application/x-ecmascript, */*; q=0.01
     28 -   ReqHeader      Accept: application/signed-exchange;v=b3;q=0.9,*/*;q=0.8
     31 -   ReqHeader      Accept: application/json, text/javascript, */*; q=0.01
     31 -   ReqHeader      Accept: text/html, application/rss+xml, application/atom+xml, text/xml, text/rss+xml
     34 -   ReqHeader      Accept: image/jpeg, image/gif, image/x-xbitmap, image/png;q=0.8, image/webp;q=0.8, */*;q=0.5
     38 -   ReqHeader      Accept: text/html,text/plain;q=0.9
     40 -   ReqHeader      Accept: text/html,text/plain,text/xml,text/*,application/xml,application/xhtml+xml,application/rss+xml,application/atom+xml,application/rdf+xml,application/php,application/x-php,application/x-httpd-php
     48 -   ReqHeader      Accept: text/html, application/xhtml+xml, */*
     63 -   ReqHeader      Accept: text/html, */*
    111 -   ReqHeader      Accept: text/css, */*
    119 -   ReqHeader      Accept: application/json
    119 -   ReqHeader      Accept: image/png, image/svg+xml, image/*;q=0.8, */*;q=0.5
    130 -   ReqHeader      Accept: application/javascript, */*;q=0.8
    144 -   ReqHeader      Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3
    160 -   ReqHeader      Accept: text/plain, */*; q=0.01
    170 -   ReqHeader      Accept: text/html,application/xhtml+xml,application/signed-exchange;v=b3,application/xml;q=0.9,*/*;q=0.8
    177 -   ReqHeader      Accept: text/html, application/xhtml+xml, image/jxr, */*
    192 -   ReqHeader      Accept: application/font-woff2;q=1.0,application/font-woff;q=0.9,*/*;q=0.8
    305 -   ReqHeader      Accept: text/html, */*; q=0.01
    466 -   ReqHeader      Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
    667 -   ReqHeader      Accept: image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5
    677 -   ReqHeader      Accept: image/png, image/svg+xml, image/jxr, image/*;q=0.8, */*;q=0.5
    909 -   ReqHeader      Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
   1276 -   ReqHeader      Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
   1872 -   ReqHeader      Accept: text/css,*/*;q=0.1
   2699 -   ReqHeader      Accept: image/webp,*/*
   3301 -   ReqHeader      Accept: image/png,image/svg+xml,image/*;q=0.8,video/*;q=0.8,*/*;q=0.5
   4271 -   ReqHeader      Accept: */*
   5407 -   ReqHeader      Accept: image/webp,image/apng,image/*,*/*;q=0.8
 
@graste

This comment has been minimized.

Copy link

@graste graste commented May 13, 2020

cut -d':' -f 2 accept-headers-above | tr "; " ";" | tr "," "\n" | sort | uniq

;*/*
*/*
;application/atom+xml
application/atom+xml
;application/atom+xml;q=0.6
;application/ecmascript
;application/font-woff2;q=1.0
application/font-woff;q=0.9
;application/javascript
;application/json
;application/msword
application/php
application/rdf+xml
;application/rdf+xml;q=0.8
application/rdf+xml;q=0.8
;application/rss+xml
application/rss+xml
application/rss+xml;q=0.9
application/signed-exchange;v=b3
;application/signed-exchange;v=b3;q=0.9
application/signed-exchange;v=b3;q=0.9
;application/vnd.ms-excel
;application/vnd.ms-powerpoint
;application/xaml+xml
;application/x-ecmascript
;application/xhtml+xml
application/xhtml+xml
application/x-httpd-php
;application/xml
application/xml
;application/xml;q=0.4
application/xml;q=0.7
;application/xml;;q=0.9
;application/xml;q=0.9
application/xml;q=0.9
;application/x-ms-application
;application/x-ms-xbap
application/x-netcdf
application/x-php
;image/*
image/*
image/apng
;image/gif
;image/jpeg
;image/jxr
;image/pjpeg
;image/png
image/png
;image/png;q=0.8
;image/*;q=0.8
image/*;q=0.8
;image/svg+xml
image/svg+xml
;image/webp
image/webp
;image/webp;q=0.8
;image/x-xbitmap
;*/*;;q=0.01
*/*;;q=0.01
;*/*;q=0.1
*/*;q=0.1
;*/*;q=0.2
;*/*;q=0.5
*/*;q=0.5
;*/*;;q=0.8
;*/*;q=0.8
/*;q=0.8
*/*;q=0.8
;*;;q=.2
;*/*;;q=.2
text/*
;text/css
;text/html
text/html
text/html;q=0.9
;text/javascript
;text/plain
text/plain
text/plain;q=0.8
text/plain;q=0.9
;text/rss+xml
;text/xml
text/xml
text/xml;q=0.2
;text/xml;q=0.4
text/xml;q=0.7
video/*;q=0.8
@drwilco

This comment has been minimized.

Copy link
Owner Author

@drwilco drwilco commented May 13, 2020

Hey guys, what's up?

@cherouvim

This comment has been minimized.

Copy link

@cherouvim cherouvim commented May 15, 2020

Hey guys, what's up?

I came here from https://www.fastly.com/lc/vary-header which is very useful. Thanks.

@cherouvim

This comment has been minimized.

Copy link

@cherouvim cherouvim commented May 15, 2020

Here is what I've collected from a news site:

 499162 gzip
 397351 gzip, deflate, br
  62557 gzip, deflate
  17269 br, gzip, deflate
   4659 gzip, deflate, sdch
   3176 gzip,deflate
   1682 gzip,deflate,br
   1445 identity
   1204 gzip, br
    904 deflate, gzip
    722 gzip, deflate, sdch, br
    560 gzip, deflate, peerdist
    341 gzip, deflate, lzma, sdch
    162 gzip;q=1.0, *;q=0.5
    150 gzip, deflate, br, peerdist
     96 gzip;q=1.0, deflate;q=1.0, identity;q=0.1, *;q=0.1
     74 gzip, x-gzip, deflate
     74 gzip,identity
     70 deflate, gzip, br
     49 gzip,deflate,identity
     40 gzip;q=1.0,deflate;q=0.6,identity;q=0.3
     35 br,gzip
     32 gzip;q=1.0, deflate;q=0.8, chunked;q=0.6, identity;q=0.4, *;q=0
     32 gzip, compress, deflate
     25 gzip,deflate,sdch
     23
      4 x-gzip, gzip, deflate
      4 gzip, deflate, compress, identity
      4 gzip, compress, bzip, bzip2, deflate
      1 none
      1 identity;q=1.0
      1 gzip, x-gzip, deflate, x-bzip2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.