- Avoid 301, 302 redirects
- Reduce DNS lookups
- Reduce the number of HTTP requests
- No 404 errors
- Always have a favicon.ico
- DNS Prefetching (?)
- Static assets (example: JS, CSS, images): "Never expire" policy by setting far future Expires header
- Dynamic assets (webpages): set appropriate cache controle headers
- Gzip
- Flight image types ?
- Etags: unique identifier zo check if asset has changed, can be used instead of last-modified
- Can we make a big Apache config for all of this?
- HTTP Headers article: https://developers.google.com/speed/articles/caching
- Specify a charcter set (so the browser doesn't have to guess)
- Concatenate JS assets
- Minify JS assets
- Uglify JS assets
<script async>in the bottom- Do not include inline JavaScript between external CSS and other resources
- Use async attribute or the script-injected way?
- Optimised async loading of cross-domain scripts: https://gist.github.com/necolas/1025811
- CSS completely on top
- Avoid repaint by using only one CSS file and no further inline CSS
- Simple CSS rule definition, avoid *, >
- Remove unused rules (unsued-css.com) (FF: Dust me selection)
- Avoid reflow (making elements bigger)
- DON'T use @import. Use multiple elements for async downloading.
Repaint: changing the color of an element. Reflow: changing the size of an element. (test with: --show-paint-rects)
- Put essential CSS in the head and async load secondary CSS ?
- Kan meerdere request tegelijk afvuren.
- Niet meer nodig om alles te concateneren ?
References:
- Help your browser to perform at the best (Fronteers): https://vimeo.com/channels/fronteersbijeenkomsten/98466383
- Google Developers: SPDY: https://developers.google.com/speed/spdy/
- Front-end performance for front-end developers (CSS Wizardry): http://csswizardry.com/2013/01/front-end-performance-for-web-designers-and-front-end-developers/
- Think async (CSS Tricks): http://css-tricks.com/thinking-async/
- Script-injected "async scripts" considered harmful: https://www.igvita.com/2014/05/20/script-injected-async-scripts-considered-harmful/
- Browserdiet: http://browserdiet.com/en/
- Google Speed: https://developers.google.com/speed/