Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Users Hate Slow Websites

Users Hate Slow Websites

Presentation from Devlink 2013 about why users hate slow websites and how to build faster sites.

Matthew Crist

August 29, 2013
Tweet

More Decks by Matthew Crist

Other Decks in Technology

Transcript

  1. CSS CSS CSS CSS CSS CSS CSS CSS CSS CSS

    CSS CSS CSS Combine many CSS files into one “compressed”.
  2. JS JS JS JS JS JS JS JS JS JS

    JS JS JS Develop a build process for JS to compress & minify
  3. IMG IMG IMG IMG IMG IMG IMG IMG IMG IMG

    IMG IMG IMG Combine images into sprites where possible.
  4. { ! background-image: url(data:image/jpeg;base64,/9j/4AAQSkZJRgABAAEAYABgAAD// gAfTEVBRCBUZWNobm9sb2dpZXMgSW5jLiBWMS4wMQD/ 2wBDAAICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMDAgIDAgICAwQDAwMDBAQEAgMEBAQEBAMEBAP/ 2wBDAQICAgICAgICAgIDAgICAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwP/ wgARCAEJAQkDAREAAhEBAxEB/8QAHAAAAQUBAQEAAAAAAAAAAAAAAgEDBAUGAAcI/8QAGQEAAwEBAQAAAAAAAAAAAAAAAAECAwQF/ 9oADAMBAAIQAxAAAAHFeB6Hi++W8U2fPs7LJUYFRwHJwEjgKRmiHay7XqSoAw/VCXnDucQp2TV/MjRkJpvPWVOr2Wpmpq+Ug63Rx +LdOW+mLbn2clnNGzqFA4FBQUCkYoh2Zej1OAWYXqjtM4jnJC18q3RzMjLbz0dWsrHVw04tBALc1y

    +PdGW1mbnDVwZzSgSOAqHEdJwKDTItGXo9Rhi3h +jKLcQXFQ3ocak5aOSxTbKEfKlLV2854NHXL5DvnsFF3hq4M5rgORWLQ4jpODgbCKzK2enU6SazVZ0eoxclLdyV9nrLyoU +qmkNtHTfKdqXSrjTj8j2nW55XmG7wydKgpCZ1BoSRQWRuiPZmaWgG1PTX0u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DQ4VIVF0RdTMgXllTrhzZbSBhWCbI69uIOUJVM4ZisG/r +zHlfE9nsiPfM38eiqxyEloMIkzKcKakhtEoFkk9Kt5i3F4fR7aOxkRLAwXSqGFQBDQHAnBwvWKf0JqfH4vP5TAfU6Pm6HzsZEspUW JL4G2iYomIEnY725ONoF7RjgiSNozUGjTpRwRyRCOWKYOsZ9N2aiz5jF5fM +rhJR57DVUCodBlBuHBkNkcqAw6Y9J3qcS0GmFjggS82FFJoUVA2gliIcqRyph6z9UNlD+VB5Op+kh Your CSS File Some images do well as DATA-URI to help reduce HTTP requests.
  5. yepnope([ { test : SomeJSTestHere, yep : ['/js/javascriptYouNeed.js', '/css/CSSYouNeed.css'], nope

    : ['/js/maybeAPolyfillOrSomethingAlongThoseLines.js', '/css/CrayCSS.css'] } ]); Your Javascript File YepNope.js
  6. The Lobster Parable Ladies and gentlemen: the story you are

    about to hear is true. Only the names have been changed...
  7. Use these as well... page:fetch // Fires when starting to

    fetch page page:receive // Fires when page received not parsed page:change // Fires when page is parsed and changed page:load // Fires when all done Turbolinks Events
  8. Built in cache page:change // Fires when page is changed

    from cache page:restore // Fires when all done Turbolinks Cache Events Turbolinks saves last 10 pages