220
Responsive Design: Clever Tips & Tricks Vitaly Friedman 13/05/2015 • Istanbul, Turkey

UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

Embed Size (px)

Citation preview

Page 1: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

Responsive Design: Clever Tips & Tricks

Vitaly Friedman13/05/2015 • Istanbul, Turkey

Page 2: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

Responsive Design: Clever Tips & Tricks

Vitaly Friedman13/05/2015 • Istanbul, Turkey

Page 3: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

Responsive Design: Clever Tips & Tricks

Vitaly Friedman13/05/2015 • Istanbul, Turkey

Page 4: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

Responsive Design: Clever Tips & Tricks

Vitaly Friedman13/05/2015 • Istanbul, Turkey

Page 5: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

Vitaly Friedman, editor-in-chiefand co-founder of SmashingMag

Page 6: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 7: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

Responsive Design Patterns

Page 8: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

“ The design process is weird and complicated because it involves people and organisations, which often are weird and complicated.

— Mark Boulton

Page 9: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

Junior Designers vs. Senior Designers, https://medium.com/the-year-of-the-looking-glass/junior-designers-vs-senior-designers-fbe483d3b51e

Page 10: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

Junior Designers vs. Senior Designers, https://medium.com/the-year-of-the-looking-glass/junior-designers-vs-senior-designers-fbe483d3b51e

Page 11: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

Design patterns help recover from hitting dead ends in creative process. They re-route your decision making process efficiently.

Page 12: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

They help you converge towards the final solution way quicker than when starting from scratch, and also limit your options much more effectively.

Page 13: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 14: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 16: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 17: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 18: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 19: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 20: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 21: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 22: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 23: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 24: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 25: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 26: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 27: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 28: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

• Keep important actions visible, not behind an icon. Clear label: MENU. Clear affordance: button shape.

• ”Burger” icon isn’t widely recognized nor understood.

Page 29: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 30: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

• 75% of people rely on their thumb and 49% rely on a one-handed grip. Keep important actions at the bottom.

• Upper navigation controls aren’t optimized for thumbs.

Page 31: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 32: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 33: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 34: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 35: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

“ …The hardest things on mobile is figuring out the right time and place to display an action.

— Luke Wroblewski

Page 36: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 37: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 38: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 39: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

“ Important actions should be in the visible area of the page. We need to ensure that the CTA buttons remain above the fold.

— pretty much every meeting

Page 40: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

Scrolling “under” the fold

• Scrolling is a widely acceptable behaviour on mobile and desktop. Just above and just below the fold areas are equally important.

• Scrolling is a continuation, clicking is a decision.Interested users will scroll as long as necessary.

Chartbeat blog, “Scroll behavior across the web”, http://blog.chartbeat.com/2013/08/12/scroll-behavior-across-the-web/

Page 41: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 42: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 43: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 44: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

• The most viewed area of the page is just above the fold,at about 550px, with just over 80% viewership.

• Many users scroll down the page before it finishes loading.

Page 45: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

• The area between 750px and 1500px is viewed for nearly three times as long as the top of the page.

• From peak at 550px, there is a slow decay in viewership.

Page 46: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 47: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 48: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 49: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 50: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 51: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 52: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 53: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 54: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 55: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 56: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 57: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 58: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 59: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 60: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 61: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 62: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 63: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 64: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

“View Mode” Approach

• Idea: using the off-canvas pattern beyond navigation, bringing focus to important features.

• Divide different features of a website into individual, encapsulated views.

• Main benefits are regaining space and the ability to live update and process user input.

“‘View mode’ approach to responsive web design”, https://medium.com/design-ux/914c7d3795fb

Page 65: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 66: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 67: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 68: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 69: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 70: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 71: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 72: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 73: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 74: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 75: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 76: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 77: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 78: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 79: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 80: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 81: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 82: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 83: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 84: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

Smarter Web Forms

Page 85: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

Image source: https://medium.com/p/7c03a9274f9

Page 86: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

Image source: https://medium.com/p/7c03a9274f9

Page 87: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 88: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 89: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 90: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 91: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 92: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 93: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 94: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 95: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 96: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 97: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

Inventory-Based Sliders

• Depending on the task, we can use single / double sliders (one value / range of values).

• Continuous sliders for indeterminate values (price/temperature), discrete sliders for pre-defined values (clothing size). Prefer the latter.

• Idea: to prevent zero-results page and weak input, use histogram slider/inventory slider.

Page 98: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 99: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 100: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 101: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 102: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 103: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 104: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 105: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 106: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 107: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 108: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 109: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 110: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 111: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 112: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 113: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 114: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

• Emoji are supported on Mac OS X 10.7+, iOS 6+, Android 4.1+, Win 8+. Not supported in Chrome.

• On Yelp, you can use Emoji to search for businesses.

Page 115: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 116: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 117: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 118: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 119: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 120: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

Better Checkout UX

• For every potential negative experience, provide reassurance, solutions and rewards:

• Intl. shipping? Detect user’s country and reassure her.

• Input mistakes: Show only error-fields and hints.

• Slow checkout: Give $5 discount after 45s in checkout.

• Card declined: Provide alternate payment methods.

• First purchase: Provide a discount for next purchase.

• Large purchase: Send a handwritten thank-you note.

• Personal profile: Ask for the favourite movie character.

Page 121: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 122: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

Optimistic Interfaces

Page 123: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

Optimistic Interfaces

• Performance is not only about technology;it’s about how users perceive it, too.

• To create a noticeable performance improvement, it has to improve by 20%.

• Idea: fake performance by being optimistic about user’s next steps.

Steven C. Seow, “Designing and Engineering Time: The Psychology of Time Perception”

Page 124: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

Optimistic Interfaces

• Perform actions optimisticallyPretend that an action succeeded right away.

• Adaptively prefetch contentReprioritize loading based on user’s actions.

• Move bits when no one is watchingKeep users busy while boring stuff happens.

Mike Krieger, co-founder of Instagram, “Secrets to Lightning-Fast Mobile Design”

Page 125: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 126: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 127: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 128: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 129: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 130: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 131: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 132: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 133: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 134: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 135: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 136: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

“ The optimal style is a backwards moving and decelerating ribbed progress bar, which made the load time appear 11% faster than a solid colored bar.

Page 137: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 138: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 139: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 140: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 141: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 142: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 143: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 144: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

Skeleton Screens

Page 145: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 146: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 147: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

Skeleton Screens

• Good feedback focuses on the progress;keeps updating current state to ease anxiety.

• Blank screens are user experience gaps that disrupt user experience. Progress bars focus on the waiting; focus on the progress instead.

• JavaScript:var size = window.getComputedStyle(document.body,':after').get PropertyValue('content'); if (size == 'desktop') { // Load some more content. }

• Idea: minimize gaps to reduce friction with “seamless” transitionsand skeleton screens.

Page 148: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 149: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 150: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 151: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 152: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 153: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 154: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 155: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 156: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 157: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 158: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 159: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 160: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

Performance Strategy

Page 161: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

“ There is no difference for the user between a site being down and a site being inaccessible due to loading issues caused by blocking resources or slow networks.

— Andy Hume“Real-Life Responsive Redesign”, SmashingConf 2013

Page 162: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 163: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

Ilya Grigorik,“Resilient Networking: Planning for Failure”, https://www.igvita.com/2015/01/26/resilient-networking/

Page 164: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 165: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

• T-Mobile roaming charges for loading thefull front page of Vogue.co.uk, in Moscow: €93,13

Page 166: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 167: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 168: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 169: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 170: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 171: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 172: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 173: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

The Guardian Redesign (2013)

• Project goals focused on mobile experience:

• Tackle dropping print circulation with mobile,• Replace the slow, rigid mobile/desktop sites,

• Solution: a mobile-first “stealth” redesign with a strong focus on progressive enhancement.

• First focus on “mobile” experience, • Long term: new RWD client-side architecture,• Ultimate goal: one code base, one responsive site.

Page 174: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 175: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

“ “Core HTML content first” with “Core CSS styles first” is a simple corollary of the good ol’ progressive enhancement.

— Andy Hume“Real-Life Responsive Redesign”, SmashingConf 2013

Page 176: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

The Guardian Redesign

• Priority lists for content and styles to define “core”:

• Core content doesn’t rely on JavaScript,• Only one main feature image considered “core”,• No Ajax support for ratings, comments and live scores,

• “Cutting the mustard” to “buckle” browsers,• Web fonts aren’t loaded by default (prevent FOUT).

Page 177: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

The Guardian’s Modular Load

• Consider at least three types of page content:

• Core content(essential HTML+CSS, usable non-JS enhanced experience);

• Enhancement(JS, Geolocation, touch, enhanced CSS, Web fonts, widgets);

• Leftovers(analytics, advertising, third-party content).

• Idea: load Core content first, then Enhancement on DOMContentReady, then Leftovers on Load.

Page 178: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 179: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 180: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 181: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 182: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 183: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

The Guardian’s Modular Load

• Load JS into a browser asynchronously.While JS is being downloaded, browser still can parse the document and show content.

• HTML/JS (for modern browsers):@if(isModernBrowser) { <script src="enhanced.js" async defer></script> }

Page 184: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 185: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

BBC’s isModernBrowser( )

• We can use server-side device detection using UA strings with DeviceAtlas, WURFL etc.

• We can use client-side feature detection to split browsers into groups “HTML4” / “HTML5”.

• JS:if ( 'querySelector' in document && 'localStorage' in window && 'addEventListener' in window ) { // HTML5 browser detected; load the JS app }

Page 186: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

BBC’s isModernBrowser( )

• JS:if ( 'querySelector' in document && 'localStorage' in window && 'addEventListener' in window ) { // HTML5 browser detected; load the JS app }

• HTML5 Browsers:IE9+, FF 3.5+, Opera 9+,Safari 4+, Chrome 1+, iOS1+,Android phone and tablets 2.1+,Blackberry OS6+, Win 7.5+,Mobile Firefox, Opera Mobile

• HTML4 Browsers:IE8-, Blackberry OS5-,Nokia S60 v6-, Nokia S40,Symbian, Windows 7 Phone (pre-Mango), a plethora of legacy devices.

Page 187: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 188: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 189: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

• A median start render time for an uncached page:0.798 seconds (iPhone 4, 3G, 1.6Mps, 300ms RTT).

• Guardian users need to successfully complete 1 HTTP-request to start reading the news.

Page 190: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

• Median time for an uncached page to startdisplaying: 0.727 seconds (stable networks).

• With enhanced JS loaded, front page has 35 images on “desktop”, 67 requests, 657 Kb.

Page 191: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 192: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 194: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 195: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 196: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 197: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

SmashingMag’s Refactoring

• Drawbacks prompted a focus on performance:

• Independent sections with separate WP-installs,• Accessing content was difficult on slow connections,

• Question: (once we clean up the front-end), how fast can we be, rather than how fast should we be?

• Decoupling JS dependencies (also with ads), • Dealing with annoying Web fonts loading.• Ultimate goal: one code base, one responsive site.

Page 198: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

“ So how fast ist fast enough? A Speed Index of under 1000. And for professionals that get there, they should shoot for delivering the critical-path view (above the fold) in the first 14Kb of the page.

— Paul Irish

Page 199: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

Performance Strategies

• Average page load (onLoad) doesn’t say much about the quality of performance. Metrics:

• Visual comparison (against competitors)• Interface response times (<=100ms)• Start render time within 1s on a suboptimal 3G

(“above-the-fold” optimization),

• Monitor perf. with a private instance of WebPageTest,

• Run code against performant budget (Grunt-task).

Page 200: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 201: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 202: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 203: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

SmashingMag’s Modular Load

• Consider three types of page content:

• Core content(essential HTML+CSS, usable non-JS enhanced experience);

• Enhancement(JS, syntax highlighter, full CSS, Web fonts, comments);

• Leftovers(analytics, advertising, Gravatar images).

• Idea: load Core content first, then Enhancement on DOMContentReady, then Leftovers on Load.

Page 204: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 205: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

SmashingMag’s Optimization

• Minor optimizations based on a simple principle: optimize content, defer the rest.

• Load critical CSS inline and full CSS on load,• Avoid JavaScript libraries ( jQuery → JavaScript),• Store Web fonts in localStorage + cookies,• Defer advertising, tracking and all non-critical CSS/JS,

• Replaced Respond.js with IE8 stylesheet (fixed-width).• Optimize the critical rendering path for content delivery.

Page 206: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

“ Critical rendering path is the chain of events that need to take place in order for a browser to start rendering this page (first paint of the page).

— Ilya Grigorik

Page 207: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

Minimizing Critical Path: CSS

• To avoid unnecessary requests necessary for the page to load, optimize the critical path:

• Identify critical CSS for main entry pages,• Load critical CSS inline on these pages,• Load the CSS async via JS during rendering,• Detect cookie to decide: inline CSS or request it directly,

• Can be automated with task runners like Grunt.

• Critical CSS is a subset of CSS needed to render the top portion of a page across all breakpoints.

Page 208: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 209: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 210: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 211: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 212: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 213: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

An Ongoing Battle

• Minor optimizations prompted us to review and adjust our editorial workflow:

• Using srcset and sizes for images in articles,• Using grunt-perfbudget to track performance,• Measuring changes in traffic and ad impressions,• Reviewing articles for performance before publishing,

• PageSpeed >= 98 both on mobile and desktop as a goal.

• Next: WebViews issues, “jumps” to comments, defer Gravatars, move to new servers, offline UX.

Page 214: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 215: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 216: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 217: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 218: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
Page 219: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

“ SmashingMag is the only site I can read on an EDGE connection when commuting in São Paulo, every day. It makes me think why other sites aren’t optimizing for slow connections, too.

— a reader from Brazil

Page 220: UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations

Thank you.