Skip to content

Instantly share code, notes, and snippets.

View foolip's full-sized avatar

Philip Jägenstedt foolip

View GitHub Profile
This file has been truncated, but you can view the full file.
2019/08/15 07:32:58:282 HTTPServer: POST http://127.0.0.1:52985/session
2019/08/15 07:32:58:282 HTTPServer: {"capabilities": {"alwaysMatch": {}}}
2019/08/15 07:32:58:860 AutomationProtocol: SEND {"method":"Automation.createBrowsingContext","params":{"presentationHint":"Window"},"id":1}
2019/08/15 07:32:59:169 AutomationProtocol: RECV {"result":{"handle":"page-BAF6DECF-098E-4B50-9A72-5C1F2A2833C8","presentation":"Window"},"id":1}
2019/08/15 07:32:59:170 AutomationProtocol: SEND {"method":"Automation.switchToBrowsingContext","params":{"browsingContextHandle":"page-BAF6DECF-098E-4B50-9A72-5C1F2A2833C8","frameHandle":""},"id":2}
2019/08/15 07:32:59:233 AutomationProtocol: RECV {"result":{},"id":2}
2019/08/15 07:32:59:233 HTTPServer: --> HTTP 200
2019/08/15 07:32:59:233 HTTPServer: --> {"value":{"sessionId":"B100B732-F397-4147-8428-41C69C57E8EC","capabilities":{"safari:platformVersion":"10.13.6","safari:automaticInspection":false,"webkit:WebRTC":{"DisableICECandidateFiltering":false,"DisableInsecureMediaCa
const {BigQuery} = require('@google-cloud/bigquery');
const bigquery = new BigQuery();
async function getFeatures() {
const query = `SELECT DISTINCT feature
FROM \`httparchive.blink_features.usage\`
WHERE yyyymmdd >= '20190601'
AND pct_urls > 1/100 AND pct_urls < 99/100
ORDER BY feature`;
We can't make this file beautiful and searchable because it's too large.
page,url,body,truncated
http://www.wetafx.co.nz/,https://www.wetafx.co.nz/themes/weta/js/main_desktop_extended.js,"/*!
* jQuery JavaScript Library v2.1.4
* http://jquery.com/
*
* Includes Sizzle.js
* http://sizzlejs.com/
*
* Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors
* Released under the MIT license
page url
http://www.baotuyetmobile.vn/ https://live.vipchat.vn/static/js/5.fc7599ee.chunk.js
http://www.politicsandwar.com/ https://cdn.plot.ly/plotly-latest.min.js
http://www.merchology-canada.myshopify.com/ https://cdn.shopify.com/s/files/1/1600/4693/t/20/assets/script.js?556945129885721949
http://www.data.world/ https://assets.data.world/js/app.20a06785d2d8599e3d7e.js
http://www.angular.cn/ https://www.angular.cn/worker-basic.min.js
http://www.facturaelectronicagfa.mx/ https://www.facturaelectronicagfa.mx/worker-basic.min.js
http://www.facturaelectronicagfa.mx/ https://www.facturaelectronicagfa.mx/worker-basic.min.js?_sw-precache=df10515adec5f5e556a4db44114b5f28
http://www.merchology.com/ https://cdn.shopify.com/s/files/1/0312/6537/t/137/assets/script.js?14395824414243321746
http://www.dare2compete.com/ https://dare2compete.com/worker-basic.min.js

Use of Accept-Language

Sites were sampled from the Majestic Million, 10 site per order of magnitude. This was done based on the suspicion that use of the header is different in the long tail of sites.

Testing was done in Sweden with different Accept-Language headers based on informed guesses about what languages the sites might support. Between any two attempts using the same site cookies were cleared to avoid previous language being remembered, but it is still possible the server had state based on IP that affected results.

Summary

By rank (buckets of 10):

  • 10-99: 2/10 sites fully localized, 2/10 localized GDPR prompts, 2/10 used physical location/IP.
# output of https://gist.github.com/foolip/d18bd25bd2547c225b4a677dbda31e4b (first revision, with two manual replacements after)
1
forbes.com
mit.edu
godaddy.com
itunes.apple.com
t.co
weebly.com
live.com
#!/usr/bin/python3
import csv
import math
import random
rows_by_logrank = {}
with open('majestic_million.csv', 'r') as csvfile:
majestic = csv.DictReader(csvfile)
'use strict';
const compareVersions = require('compare-versions');
const fs = require('fs');
const path = require('path');
const uaParser = require('ua-parser-js');
const overrides = require('./overrides').filter(Array.isArray);
function findEntry(bcd, path) {
'use strict';
const compareVersions = require('compare-versions');
const fs = require('fs');
const path = require('path');
const uaParser = require('ua-parser-js');
const overrides = require('./overrides').filter(Array.isArray);
function findEntry(bcd, path) {
'use strict';
const compareVersions = require('compare-versions');
const fs = require('fs');
const path = require('path');
const uaParser = require('ua-parser-js');
const overrides = require('./overrides').filter(Array.isArray);
function findEntry(bcd, path) {