8 connections max per browser HTTP 2: single multiplex connection. +Link header (preloading) Works in every major browser * Works in every server: HAProxy 1.8, nginx, Digital Ocean LBs, Amazon ELBs, Azure Application Gateway HTTPS://CANIUSE.COM/#FEAT=HTTP2 0 200 400 600 800 1000 1200 1400 1600 1800 2000 HTTP1.1 HTTP/2 Page load time (ms)
versions at max compression Dynamic CS/JS/HTML: brotli on setting 4 or 5 for fast responses and better compression Every major browser! * 0 20 40 60 80 100 120 JS CSS HTML gzip brotli HTTPS://CANIUSE.COM/#SEARCH=BROTLI
browserify or webpack? discify and webpack-visualizer finds the modules are occupying the most space We discovered country-data package was 320K – replaced it with a smaller module we made with just data we needed. Using ES6 modules? Tree shaking can be used to remove unused imports.
request loads entire page, consolidates DOM changes, focuses on rendering on-screen content, prevents scripts blocking page rendering, image loading making page jump, etc. • Using a CMS? Ghost has AMP built it. • Express middleware to automatically create AMP – amps-in-the-trunk 1 • Note: will show your content as coming from ‘amp.google.com’. Google say they will fix this in future * HTTPS://WWW.AMPPROJECT.ORG/LATEST/BLOG/IMPROVING-URLS-FOR-AMP-PAGES/ 0 5,000 10,000 15,000 20,000 25,000 Non AMP AMP Source: https://timkadlec.com/remembers/2018-03-19-how-fast-is-amp-really/
sites as Not Secure Let’s Encrypt, Cloudflare, Heroku, AWS will all give free DV certs Only requirement for DV is owning a domain DV certs can be issued instantly, as does not verify (or include) organization in cert
the site Certs include verified organization Requires government, independent record checks, phone calls as part of verification process – I’m biased but CertSimple make this easier!
current sites. • RSA 4096 is too slow for mobile • ECC P256 – newer sites, CloudFlare. Roughly equivalent to 3072 bit RSA • Breaks on macOS 10.9, Windows XP, Android 2.3 and Java 6 • Future: ECC Curve25519 (128) and Curve228 (224 bits)
escapes user data by default. But it probably doesn’t do it well. * CSP says what URLs are allowed for JS, images, network connections, frames, styles, etc. csp-by-api is a JS tool to build CSP by simply stating what services you use HTTPS://WWW.OWASP.ORG/INDEX.PHP/XSS_FILTER_EVASION_CHEAT_SHEET 7 pm GMT+2 to 11 pm GMT+2
– there’s less things to break Note Digital Ocean doesn’t support brotli AWS doesn’t support ECC certs HAProxy 1.8 Dynamic configuration No Brotli nginx No dynamic reconfiguration (needs nginx+)
CloudInit works everywhere AWS / Azure / Digital Ocean / Google Cloud deploy-node-on-linux generates CloudInit files to build a box, pull your app with Github deploy keys, a Linux .service for your app, automatic restarts, etc 1 HTTPS://GITHUB.COM/CERTSIMPLE/DEPLOY-NODE-ON-LINUX