Skip to content

Instantly share code, notes, and snippets.


Ilya Grigorik igrigorik

View GitHub Profile
View webperf-wg-July 26th-2018.txt
<igrigorik> Ilya Grigorik agenda:
11:07 Doug: NEL and Reporting moved from WICG to WebPerf
11:07 ... we have i2s LGTM's for both in Chrome
11:07 ... we'll be launching as stable experiments this quarter
11:07 ... we should have live implementation in chrome by EOQ
11:08 ... some good feedback from i2s process, which resulted in spec updates
11:08 ... one common question from TAG was about using JSON in headers
11:09 ... we got some pushback from TAG on JSON; there are known gotchas with JSON — e.g. numbers.
11:09 ... alternative would be to use structured headers (being developed by httpwg / IETF)
11:10 ... after some analysis, we ended *not* doing that and sticking with JSON

Keybase proof

I hereby claim:

  • I am igrigorik on github.
  • I am igrigorik ( on keybase.
  • I have a public key whose fingerprint is 873B C0D7 3D56 C15C D67A 9F0E 9F75 9AC6 6FD4 B89B

To claim this, I am signing this object:

> performance.getEntriesByName('W3C-meetup')
> [ PerformanceEvent
         name: "W3C WebPerf meetup"
    startTime: "5:30pm–7:30pm Wednesday"
     location: "Ballroom CD"
    entryType: "Unconference"
       topics: "latest & upcoming perf APIs, feature requests, bugs, feedback, …"
igrigorik / domtokenlist_feature_detection.js
Last active Aug 26, 2021 — forked from yoavweiss/domtokenlist_feature_detection.js
DOMTokenList supports() example for Preload
View domtokenlist_feature_detection.js
var DOMTokenListSupports = function(tokenList, token) {
if (!tokenList || !tokenList.supports) {
try {
return tokenList.supports(token);
} catch (e) {
if (e instanceof TypeError) {
console.log("The DOMTokenList doesn't have a supported tokens list");
} else {
View compression.bash
$> ls -al index.html
-rw-r--r-- 1 igrigorik 5000 21854 Dec 3 14:57 index.html
$> curl -vv --compressed
* Trying
* Connected to ( port 80 (#0)
> GET /preload/ HTTP/1.1
> Host:
> User-Agent: curl/7.43.0
> Accept: */*
View query.sql
(SELECT 'desktop' type,
NTH(50, quantiles(bytesCSS)) median,
NTH(75, quantiles(bytesCSS)) seventy_fifth,
NTH(90, quantiles(bytesCSS)) ninetieth
FROM [httparchive:runs.latest_pages]),
(SELECT 'mobile' type,
NTH(50, quantiles(bytesCSS)) median,
NTH(75, quantiles(bytesCSS)) seventy_fifth,
NTH(90, quantiles(bytesCSS)) ninetieth
View table-ranges.sql
/* count number of pushes between Jan 1 and Jan 5 */
FROM `*`
type = 'PushEvent'
/* count number of watches between Jan~Oct 2014 */
View bq.sql
/* count of issues opened, closed, and reopened on 2019/01/01 */
SELECT event as issue_status, COUNT(*) as cnt FROM (
SELECT type,, actor.login,
JSON_EXTRACT(payload, '$.action') as event,
WHERE type = 'IssuesEvent'
GROUP by issue_status;
igrigorik /
Last active Jun 14, 2016
Mechanism to communicate server timing data to the client (Server Timing)

Navigation and Resource Timing provides timing data for the fetch, but currently there is no interoperable way for the server to communicate own timing information to the client. For example:

  • What steps were taken to generate the resource, and how long each took. Many sites already embed this type of information via HTML comments - e.g. wordpress emits <!--Page generated in X.X seconds.--> , and many sites provide more detailed stats (cache, db, generation) to enable performance debugging.
  • If proxied, where was the time spent - e.g. time to fetch from origin, time to process response, etc.

Instead of relying on arbitrary HTML comments, we can define an HTTP header that can be used to send key-value pairs in a well defined format. Making this data available via a well defined interface would...

  • Allow UA and other developer tools to automatically annotate appropriate timelines.
  • Allow analytics vendors to gather this data for operational analysis.
  • Allows proxies and CDNs to append custom timing d
igrigorik /
Created Aug 22, 2014
Bandwidth ceiling mappings for different generation networks. See:
Android iOS Gen Down max
NETWORK_TYPE_GPRS CTRadioAccessTechnologyGPRS 2.5G
NETWORK_TYPE_EDGE CTRadioAccessTechnologyEdge 2.75G
NETWORK_TYPE_1xRTT CTRadioAccessTechnologyCDMA1x 3G
NETWORK_TYPE_EVDO_0 CTRadioAccessTechnologyCDMAEVDORev0 3.5G