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

Performance Matters: Mobile Websites

Avatar for Burak Burak
May 13, 2014

Performance Matters: Mobile Websites

Avatar for Burak

Burak

May 13, 2014

More Decks by Burak

Other Decks in Technology

Transcript

  1. THE MOBILE WORLD +7.000 different devices Several software versions &

    browsers Low CPU/GPU Power Various connection speed Hybrid apps* are way slower than the browser * Apps built with Phonegap, Cordova, Titanium etc.
  2. FACTS 74% of mobile users will abandon the website after

    waiting 5 seconds. 1 second delay in page response can result in a 7% reduction in conversions If the product is making $100.000 per day, a 1 second page delay could potentially cost you $2.5 million in lost sales every year source: e-commercefacts.com, kissmetrics.com
  3. REDUCE PAGE LOAD TIME Avoid too many HTTP requests -

    they are expensive! Minimize and gzip the assets, PLEASE! Redirection on client-side is bad Use image sprites as much as you can Clean and reusable markup
  4. CSS Browser reads selectors right-to-left Avoid more than three levels

    in your SASS/LESS files Universal selectors are the least efficient * { } *#maincontent { } input[type=”text”] { } span.icon.share.white { } // bad .icon-share-white { } // good .main-page #content .container .grid .span12 .left-col .btn { } Chaining is not über-cool either
  5. CSS causes sluggishness Shadows, gradients, border-radius... are expensive too Use

    transform for transitions and animations position: fixed; left: 80%; transform: translateX( 80% ); // smoother
  6. CSS SVG (Scalable Vector Graphics) Resolution Independence Inline or as

    a background image Can be animated Polyfill is needed for Android 2.x Minify with SVGO
  7. Do you really need that library/plugin? Maybe not? Load them

    at the very bottom Watch out for memory leaks Use for animations 300ms tapping delay Lazyload would help a lot JAVASCRIPT requestAnimationFrame()
  8. Safari Web Inspector - iOS Chrome Developer Tools - android

    Adobe Edge Inspect - iOS and android Webpagetest.org - page load time results DEBUGGING TOOLS
  9. THANK YOU! @burakson TL; DL (too long didn’t listen) “If

    your application is slow, people won’t use it” Don’t Forget: Performance is a big part of the user experience!