SlideShare une entreprise Scribd logo
1  sur  101
Télécharger pour lire hors ligne
Mobile First Responsive Design




  Jason Grigsby • @grigs • jason@cloudfour.com

           http://www.flickr.com/photos/stuart-dootson/4024407198
Follow along
              @grigs
      Slides: bit.ly/mf-rwd




http://www.flickr.com/photos/stevegarfield/4247757731/
The web has always been a balancing act…




http://www.flickr.com/photos/classblog/5136926303
with many competing priorities.




                                  http://www.flickr.com/photos/tudor/4324056624/
Finding that balance
is more difficult…




                       http://www.flickr.com/photos/superfantastic/50088733/
as device diversity increases.
    http://www.flickr.com/photos/lyza/7382235106
Responsive web design offers us




for a sensible way to deal with device diversity.

              http://www.flickr.com/photos/darrentunnicliff/4232232092/
And yet the one question I frequently ask myself is…
Can a one size fits all solution…




            http://www.flickr.com/photos/sldghmmr/6041481069
compete with
a tailored experience?
http://www.flickr.com/photos/helloturkeytoe/4932748746/
Important question from many perspectives:
Important question from many perspectives:


       Search engine optimization

                 Context

               Advertising

              Performance
Search engines?
What about
  mobile context?




http://www.flickr.com/photos/brunauto/5062644167/
80% during
misc downtime

76% while
waiting in lines

62% while
watching TV

69% for point of
sale research


                   http://www.flickr.com/photos/missmeng/5327470961
TMI: 39% use phone
on the toilet.
Advertising?




               http://www.flickr.com/photos/
               sh1mmer/2510487525
Performance?
http://www.akamai.com/dl/whitepapers/ecommerce_website_perf_wp.pdf
Shopzilla improves load time 5 seconds




     http://velocityconf.com/velocity2009/public/schedule/detail/7709
http://www.gomez.com/wp-content/downloads/19986_WhatMobileUsersWant_Wp.pdf
http://www.flickr.com/photos/wesbrowning/5316400258/
BBG: Before Boston Globe




 http://www.flickr.com/photos/69797234@N06/7203485148/
Media Queries Hide Problems

            Original   Resized   K Saved   % Saved

Holmes       34.7K      8.1K      26.6K     76.6%

Watson       39.0K      8.4K      30.6K     78.4%

Mycroft      30.5K      6.7K      23.8K     78.0%

Moriarty     43.4K      8.2K      35.2K     81.1%

 Adler       26.0K      6.6K      19.4K     74.6%

Winter       34.7K      7.8K      26.9K     77.5%

 Total       208.3K     45.8K    162.5K     78.0%
Crap, that’s not what I was trying to do.

   https://twitter.com/ldexterldesign/status/55229350299181057
What I meant to say:


The way in which CSS media queries have been
promoted for mobile hides tough problems and
gives developers a false promise of a simple
solution for designing for multiple screens.
The resounding answer from the community:
Mobile First Responsive Web Design
Mobile First Responsive Web Design




http://bradfrostweb.com/blog/web/mobile-first-responsive-web-design/
“Awesome. We’ll
devote a chapter to
   Mobile First
 Responsive Web
Design in our book.”
“Awesome. We’ll
devote a chapter to
   Mobile First
 Responsive Web
Design in our book.”

Famous last words.
Where are the Mobile First RWDs?
      106 sites from mediaqueri.es tested

                               9%
                          4%                 25%


                    21%
                                                 4%




                                     38%



        Mobile is Larger                   Same Size
        Less than 10% Savings              11 to 50% Savings
        51% to 100% Savings                Greater than 100% Savings

http://blog.cloudfour.com/where-are-the-mobile-first-responsive-web-designs/
Guy Podjarny repeated the experiment a year later.
       347 sites from mediaqueri.es tested

                                     3%
                              11%




                                            86%




            Same size             A bit smaller            Much smaller
                        A bit smaller = 50%-90% the size
                         Much smaller = <50% the size

  http://www.slideshare.net/guypod/performance-implications-of-mobile-design
http://www.thefoxisblack.com/2012/10/02/the-design-thinking-behind-the-new-disney-com/
Thankfully Guy took the tests further…
Big site, big waterfall

                                                                 1600x1200




http://www.slideshare.net/guypod/performance-implications-of-mobile-design
Small site, big waterfall

                                                                   320x480




http://www.slideshare.net/guypod/performance-implications-of-mobile-design
1398 elements
1402 elements
                                                       3491 nodes
3485 nodes




                                                         Simplicity
                                                        not reflected
                                                         in DOM



                1600x1200                                                              320x480

                http://www.slideshare.net/guypod/performance-implications-of-mobile-design
http://www.flickr.com/photos/beautyredefined/2643858323/
http://www.flickr.com/photos/puuikibeach/3654517679
Most responsive web designs are…
Time to pen another fool’s gold post?
       http://www.flickr.com/photos/myklroventine/3400040943/
https://twitter.com/scottjehl/status/243025352069349377
5   key techniques
    for responsible
    responsive design
#1   Build Mobile First
     Responsive Designs




      http://www.flickr.com/photos/auyongcheemeng/95769332/
Different than
  Mobile First
  Design Theory




http://www.flickr.com/photos/localcelebrity/4831362933/
Mobile First Responsive Web Design




http://bradfrostweb.com/blog/web/mobile-first-responsive-web-design/
Reorder media queries so cascade goes
      from small to large screens


 /* Wider viewports/higher resolutions (e.g. desktop)      */
 @media screen and (min-width:481px) {
     [Desktop layout rules here]         M ove the mobile media query block
 }                                       above the desktop media query.
                                         By doing this, we’re making S re
                                                                     su
                                         the cascading effect of CSfiris
 /* Mobile/lower-resolution devices */
 @media screen and (max-width:480px) {                                  st
                                         consistent with our mobile oach.
     [Mobile layout rules here]           progressive enhancement appr
 }




Keep basic styles outside of media queries.
The absence of support for media
queries is in fact the first media query.
                    —Bryan Rieger, Yiibu
Oh come on IE. No love?




                 Because IE 8 and below don’t su
                 media queries, IE isn’t getting t pport
                 CSS rules that create columns. he
IE conditional comments



<link rel="stylesheet" type="text/css" href="taps.css" />
<link rel="stylesheet" type="text/css" href="layout.css" media="all and
(min-width: 481px)">
<!--[if (lt IE 9)&(!IEMobile)]>
<link rel="stylesheet" type="text/css" href="layout.css" media="all" />
<![endif]-->



  The conditional comment repeats the line above it
  ensuring desktop IE sees our layout.css file.
IE conditional comments



<link rel="stylesheet" type="text/css" href="taps.css" />
<link rel="stylesheet" type="text/css" href="layout.css" media="all and
(min-width: 481px)">
<!--[if (lt IE 9)&(!IEMobile)]>
<link rel="stylesheet" type="text/css" href="layout.css" media="all" />
<![endif]-->



  The conditional comment repeats the line above it
  ensuring desktop IE sees our layout.css file.


                               or use Respond.js
                             (a media query polyfill for IE)
#2       Keep CSS images
         in their place




 http://www.flickr.com/photos/lintmachine/2306383943/
Images with display:none are still downloaded



                                  K making it
       The taps.jpg file is 440.7 .
       the largest file on the page




@media screen and (max-width:480px) {
    [Other CSS rules are here]
    .header {display:none;}
}
Put CSS images inside media queries to
      prevent extra downloads


@media screen and (min-width:481px){
    .header {
        background:URL('images/taps.jpg') repeat-x;
        height: 300px;
    }
}
http://timkadlec.com/2012/04/media-query-asset-downloading-results/
#3                 Conditionally load JS based
                   on screen size and capabilities




http://www.flickr.com/photos/lyza/7382255242/
Hiding content with display:none does
          not prevent it from downloading.
                        Look inside ontap.html to
                        find this code.
 <iframe id="map" width="300" height="300" frameborder="0" scrolling="no"
marginheight="0" marginwidth="0" src="http://maps.google.com..."></iframe>
This single iframe causes 47 files to be downloaded!
                                                                              Extremely long URL abbreviated

                                              taps.css

                               @media screen and (max-width:480px) {
                                   .
                                                                      les
                                   .            There are many more ru
                                   .            in the css file.
                                   #map {display:none;}
                               }



                                       The iframe has an id of map. This rule hides
                                       the Google Maps iframe by setting the
                                       display to none.
https://github.com/paulirish/matchMedia.js
http://adactio.com/journal/5429/
AJAX Include Pattern


<a href="articles/latest/"
   data-append="articles/latest/fragment"
   data-media="(min-width: 30em)">
   Latest Articles
</a>



          https://github.com/filamentgroup/Ajax-Include-Pattern/
#4   Deliver different size <IMG>s
     at different screen sizes




           http://www.flickr.com/photos/kk/230544325/
One SRC to rule all images

                                  On
                eer labels on thetag
There are 16 b hat use an img          Despite the need for multiple versions of this image depending on
                                                                                                         the
Tap Now page tr the Bensons Bubbler.   screen size, HTML only allows one value for the src.
 like this one fo
            <img src="brews_images/bensons_bubbler.jpg" alt="Bensons Bubbler">
Things are still moving forward on a standards-
    based approach for responsive images.




            http://www.flickr.com/photos/johnlamb/2576062549/
http://responsiveimages.org/
Add more on current status of spec.
Add more on the questions we still need to answer.
Picturefill JavaScript Library
<div data-picture data-alt="A giant stone face at The Bayon temple in Angkor Thom,
Cambodia">
  <div data-src="small.jpg"></div>
  <div data-src="medium.jpg" data-media="(min-width: 400px)"></div>
  <div data-src="large.jpg" data-media="(min-width: 800px)"></div>
  <div data-src="extralarge.jpg" data-media="(min-width: 1000px)"></div>


  <!-- Fallback content for non-JS browsers. -->
  <noscript>
    <img src="small.jpg" alt="A giant stone face at The Bayon
    temple in Angkor Thom, Cambodia">
  </noscript>
</div>



                  https://github.com/scottjehl/picturefill
Regardless of the img technique you choose,
Plan to deprecate it when standards
 catch up with responsive images.
#5   Handle high-density
     images carefully
Downloads both standard and retina images       Apple.com as an anti-pattern



                                                                               The total size of the page
                                                                                   goes from 502.90K to
                                                                                2.13MB when the retina
                                                                                   versions of images are
                                                                                              downloaded.



                                            http://blog.cloudfour.com/how-apple-com-will-serve-retina-images-to-new-ipads/
If possible, use CSS for now
<style>
      #main {
           background-size: 400px 250px;
      }
      @media screen and (-webkit-device-pixel-ratio: 1) {
           /* Image for normal displays. */
           #main {
               background-image: url(dog.jpg);
           }
      }
      @media screen and (-webkit-min-device-pixel-ratio: 2) {
           /* Image for high resolution displays. */
           #main {
               background-image: (dog-hi-res.jpg);
           }
      }
</style>
CSS image-set new proposed spec



div.dog {
    background-image: -webkit-image-set(url(dog.jpg) 1x,
                       url(dog-hi-res.jpg) 2x);
}
Picturefill User Preference Branch




    https://github.com/scottjehl/picturefill/tree/user-prefs
Large JPEGs with Low Quality Settings?




     http://blog.netvlies.nl/design-interactie/retina-revolution/
SOUTH
      L
     TIA




                    STREET



                                                              DE
 EN




                                                              LU
SS




                                                          INC
EC




                                                         AX
                                                         AJ
           https://github.com/filamentgroup/Southstreet
It’s two years later. Let’s revisit the
       my original question.
Can a one size fits all solution…




         http://www.flickr.com/photos/theyoungthousands/4025421438
compete with
a tailored experience?
http://www.flickr.com/photos/fronx/2862975043
Or will we always
end up with
something that is
too big?

  http://www.flickr.com/photos/haddadi/5971508861
Unlikely responsive
design will ever be as fast
as something crafted
specifically for a device.




 http://www.flickr.com/photos/quarenta/3256329577
But web design is a
                                                       balancing act.



http://www.flickr.com/photos/kalexanderson/6266452817
And performance
is just one factor.
For most projects,
responsive design can be fast
enough to make sense…




                                Flickr: Uploaded February 11, 2007 by hawridger
if we do the extra work
to make mobile first
responsive designs.
Thank You!
 Special thanks to Scott Jehl, Guy
Podjarny, and all of the Flickr users
 sharing under creative commons.



  Jason Grigsby • @grigs
   jason@cloudfour.com
    Slides: bit.ly/mf-rwd

  http://www.flickr.com/photos/sualk61/4083223760/

Contenu connexe

Tendances

Information Architecture in Mobile
Information Architecture in MobileInformation Architecture in Mobile
Information Architecture in Mobile
Lazar Petrakiev
 
Web App vs Web Site
Web App vs Web SiteWeb App vs Web Site
Web App vs Web Site
Matt Evans
 
The Mobile Platform World
The Mobile Platform WorldThe Mobile Platform World
The Mobile Platform World
Matt Evans
 

Tendances (18)

A Web for Everyone
A Web for EveryoneA Web for Everyone
A Web for Everyone
 
Information Architecture in Mobile
Information Architecture in MobileInformation Architecture in Mobile
Information Architecture in Mobile
 
Responsive web design
Responsive web designResponsive web design
Responsive web design
 
Mobilism 2011: How to put the mobile in the mobile web
Mobilism 2011: How to put the mobile in the mobile webMobilism 2011: How to put the mobile in the mobile web
Mobilism 2011: How to put the mobile in the mobile web
 
Planning Your Progressive Web App
Planning Your Progressive Web AppPlanning Your Progressive Web App
Planning Your Progressive Web App
 
Responsive Web Design - more than just a buzzword
Responsive Web Design - more than just a buzzwordResponsive Web Design - more than just a buzzword
Responsive Web Design - more than just a buzzword
 
Web App vs Web Site
Web App vs Web SiteWeb App vs Web Site
Web App vs Web Site
 
Exploring the physical web
Exploring the physical webExploring the physical web
Exploring the physical web
 
Progressive Web App Challenges
Progressive Web App ChallengesProgressive Web App Challenges
Progressive Web App Challenges
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
Why Progressive Web Apps will transform your website
Why Progressive Web Apps will transform your websiteWhy Progressive Web Apps will transform your website
Why Progressive Web Apps will transform your website
 
The Mobile Platform World
The Mobile Platform WorldThe Mobile Platform World
The Mobile Platform World
 
Mobile ux sot a and challenges
Mobile ux sot a and challengesMobile ux sot a and challenges
Mobile ux sot a and challenges
 
Adaptive Designs Across Devices [UXIM 2015]
Adaptive Designs Across Devices [UXIM 2015]Adaptive Designs Across Devices [UXIM 2015]
Adaptive Designs Across Devices [UXIM 2015]
 
Proactive Responsive Design
Proactive Responsive DesignProactive Responsive Design
Proactive Responsive Design
 
Uxperts mobi 2013 soa & challenges
Uxperts mobi 2013   soa & challengesUxperts mobi 2013   soa & challenges
Uxperts mobi 2013 soa & challenges
 
Responsive Design & Beyond [Code & Creativity Workshop]
Responsive Design & Beyond [Code & Creativity Workshop]Responsive Design & Beyond [Code & Creativity Workshop]
Responsive Design & Beyond [Code & Creativity Workshop]
 
The Progressive Web and its New Challenges - Confoo Montréal 2017
The Progressive Web and its New Challenges - Confoo Montréal 2017The Progressive Web and its New Challenges - Confoo Montréal 2017
The Progressive Web and its New Challenges - Confoo Montréal 2017
 

En vedette

World Vision Zika Emergency Response Presentation
World Vision Zika Emergency Response PresentationWorld Vision Zika Emergency Response Presentation
World Vision Zika Emergency Response Presentation
Ashley Overholser
 
Device Fragmentation 2011 / Metrics of the Mobile Web
Device Fragmentation 2011 / Metrics of the Mobile WebDevice Fragmentation 2011 / Metrics of the Mobile Web
Device Fragmentation 2011 / Metrics of the Mobile Web
Avenga Germany GmbH
 
Awesome android apps
Awesome android appsAwesome android apps
Awesome android apps
Richard Byrne
 
Sneak Peek at Google I/O 2014 Highlights
Sneak Peek at Google I/O 2014 HighlightsSneak Peek at Google I/O 2014 Highlights
Sneak Peek at Google I/O 2014 Highlights
TechAhead
 
Baromobile 2012 : le baromètre de l'internet mobile - SFR régie - OMG
Baromobile 2012 : le baromètre de l'internet mobile - SFR régie - OMGBaromobile 2012 : le baromètre de l'internet mobile - SFR régie - OMG
Baromobile 2012 : le baromètre de l'internet mobile - SFR régie - OMG
Romain Fonnier
 

En vedette (20)

OEM Presentation - IA and Emergency Response
OEM Presentation -  IA and Emergency ResponseOEM Presentation -  IA and Emergency Response
OEM Presentation - IA and Emergency Response
 
Dr Congo Emergency Response Presentation (Regional Consultation Dar Es Salaam...
Dr Congo Emergency Response Presentation (Regional Consultation Dar Es Salaam...Dr Congo Emergency Response Presentation (Regional Consultation Dar Es Salaam...
Dr Congo Emergency Response Presentation (Regional Consultation Dar Es Salaam...
 
World Vision Zika Emergency Response Presentation
World Vision Zika Emergency Response PresentationWorld Vision Zika Emergency Response Presentation
World Vision Zika Emergency Response Presentation
 
Emergency FIrst Responder Presentation I Dive
Emergency FIrst Responder Presentation I Dive Emergency FIrst Responder Presentation I Dive
Emergency FIrst Responder Presentation I Dive
 
Mobile trends to transform your business in 2015
Mobile trends to transform your business in 2015Mobile trends to transform your business in 2015
Mobile trends to transform your business in 2015
 
Emergency First response Presentation
Emergency First response PresentationEmergency First response Presentation
Emergency First response Presentation
 
Why "mobile first" isn't enough - Developing a better user experience
Why "mobile first" isn't enough - Developing a better user experienceWhy "mobile first" isn't enough - Developing a better user experience
Why "mobile first" isn't enough - Developing a better user experience
 
Référencement Mobile - Anji Ismail - SEO Campus 2010
Référencement Mobile - Anji Ismail - SEO Campus 2010Référencement Mobile - Anji Ismail - SEO Campus 2010
Référencement Mobile - Anji Ismail - SEO Campus 2010
 
Mobile Marketing for Nonprofits with Mobile Apps
Mobile Marketing for Nonprofits with Mobile AppsMobile Marketing for Nonprofits with Mobile Apps
Mobile Marketing for Nonprofits with Mobile Apps
 
The web you were used to is gone. Architecture and strategy for your mobile c...
The web you were used to is gone. Architecture and strategy for your mobile c...The web you were used to is gone. Architecture and strategy for your mobile c...
The web you were used to is gone. Architecture and strategy for your mobile c...
 
Mobile Marketing Stats Automotive Dealers Should Know
Mobile Marketing Stats Automotive Dealers Should KnowMobile Marketing Stats Automotive Dealers Should Know
Mobile Marketing Stats Automotive Dealers Should Know
 
Marketingcharts mobile-marketing-data-2011
Marketingcharts mobile-marketing-data-2011Marketingcharts mobile-marketing-data-2011
Marketingcharts mobile-marketing-data-2011
 
Device Fragmentation 2011 / Metrics of the Mobile Web
Device Fragmentation 2011 / Metrics of the Mobile WebDevice Fragmentation 2011 / Metrics of the Mobile Web
Device Fragmentation 2011 / Metrics of the Mobile Web
 
10 Important Design Changes to iOS 7
10 Important Design Changes to iOS 710 Important Design Changes to iOS 7
10 Important Design Changes to iOS 7
 
Day in the life of a mobile commerce user
Day in the life of a mobile commerce userDay in the life of a mobile commerce user
Day in the life of a mobile commerce user
 
Awesome android apps
Awesome android appsAwesome android apps
Awesome android apps
 
5 Lessons in Digital Publishing
5 Lessons in Digital Publishing 5 Lessons in Digital Publishing
5 Lessons in Digital Publishing
 
Sneak Peek at Google I/O 2014 Highlights
Sneak Peek at Google I/O 2014 HighlightsSneak Peek at Google I/O 2014 Highlights
Sneak Peek at Google I/O 2014 Highlights
 
Baromobile 2012 : le baromètre de l'internet mobile - SFR régie - OMG
Baromobile 2012 : le baromètre de l'internet mobile - SFR régie - OMGBaromobile 2012 : le baromètre de l'internet mobile - SFR régie - OMG
Baromobile 2012 : le baromètre de l'internet mobile - SFR régie - OMG
 
Content marketing world_mobile and tablet content distribution_8_17_2012
Content marketing world_mobile and tablet content distribution_8_17_2012Content marketing world_mobile and tablet content distribution_8_17_2012
Content marketing world_mobile and tablet content distribution_8_17_2012
 

Similaire à Mobile First Responsive Design

When responsive web design meets the real world
When responsive web design meets the real worldWhen responsive web design meets the real world
When responsive web design meets the real world
Jason Grigsby
 
Responsive UX - One size fits all @BigDesign conference #BigD12
Responsive UX - One size fits all   @BigDesign conference #BigD12Responsive UX - One size fits all   @BigDesign conference #BigD12
Responsive UX - One size fits all @BigDesign conference #BigD12
touchtitans
 
Responsive Web Design & the state of the Web
Responsive Web Design & the state of the WebResponsive Web Design & the state of the Web
Responsive Web Design & the state of the Web
Yiannis Konstantakopoulos
 
Designing future proof websites
Designing future proof websitesDesigning future proof websites
Designing future proof websites
Four Kitchens
 
Effective and Efficient Design with CSS3
Effective and Efficient Design with CSS3Effective and Efficient Design with CSS3
Effective and Efficient Design with CSS3
Zoe Gillenwater
 

Similaire à Mobile First Responsive Design (20)

Progressive Enhancement 2.0 (jQuery Conference SF Bay Area 2011)
Progressive Enhancement 2.0 (jQuery Conference SF Bay Area 2011)Progressive Enhancement 2.0 (jQuery Conference SF Bay Area 2011)
Progressive Enhancement 2.0 (jQuery Conference SF Bay Area 2011)
 
Progressive Enhancement 2.0 (Conference Agnostic)
Progressive Enhancement 2.0 (Conference Agnostic)Progressive Enhancement 2.0 (Conference Agnostic)
Progressive Enhancement 2.0 (Conference Agnostic)
 
Faster Frontends
Faster FrontendsFaster Frontends
Faster Frontends
 
Pinkoi Mobile Web
Pinkoi Mobile WebPinkoi Mobile Web
Pinkoi Mobile Web
 
When responsive web design meets the real world
When responsive web design meets the real worldWhen responsive web design meets the real world
When responsive web design meets the real world
 
Responsive websites. Toolbox
Responsive websites. ToolboxResponsive websites. Toolbox
Responsive websites. Toolbox
 
Imagesandvideo stockholm fastandbeautiful
Imagesandvideo stockholm fastandbeautifulImagesandvideo stockholm fastandbeautiful
Imagesandvideo stockholm fastandbeautiful
 
Responsive design
Responsive designResponsive design
Responsive design
 
CSS3 Media Queries: Mobile Elixir or CSS Snake Oil
CSS3 Media Queries: Mobile Elixir or CSS Snake OilCSS3 Media Queries: Mobile Elixir or CSS Snake Oil
CSS3 Media Queries: Mobile Elixir or CSS Snake Oil
 
Mobile Web Speed Bumps
Mobile Web Speed BumpsMobile Web Speed Bumps
Mobile Web Speed Bumps
 
Responsive UX - One size fits all @BigDesign conference #BigD12
Responsive UX - One size fits all   @BigDesign conference #BigD12Responsive UX - One size fits all   @BigDesign conference #BigD12
Responsive UX - One size fits all @BigDesign conference #BigD12
 
Now you see me... Adaptive Web Design and Development
Now you see me... Adaptive Web Design and DevelopmentNow you see me... Adaptive Web Design and Development
Now you see me... Adaptive Web Design and Development
 
Responsive Web Design & the state of the Web
Responsive Web Design & the state of the WebResponsive Web Design & the state of the Web
Responsive Web Design & the state of the Web
 
Designing future proof websites
Designing future proof websitesDesigning future proof websites
Designing future proof websites
 
Effective and Efficient Design with CSS3
Effective and Efficient Design with CSS3Effective and Efficient Design with CSS3
Effective and Efficient Design with CSS3
 
Imagesandvideo stockholm webmeetup
Imagesandvideo stockholm webmeetupImagesandvideo stockholm webmeetup
Imagesandvideo stockholm webmeetup
 
Imagesandvideo tallinn
Imagesandvideo tallinnImagesandvideo tallinn
Imagesandvideo tallinn
 
Stefan Judis "Did we(b development) lose the right direction?"
Stefan Judis "Did we(b development) lose the right direction?"Stefan Judis "Did we(b development) lose the right direction?"
Stefan Judis "Did we(b development) lose the right direction?"
 
Responsive Websites
Responsive WebsitesResponsive Websites
Responsive Websites
 
Responsive Design - WordUp Edinburgh 2011
Responsive Design - WordUp Edinburgh 2011Responsive Design - WordUp Edinburgh 2011
Responsive Design - WordUp Edinburgh 2011
 

Plus de Jason Grigsby

Mobile is the future: Do you have your strategy?
Mobile is the future: Do you have your strategy?Mobile is the future: Do you have your strategy?
Mobile is the future: Do you have your strategy?
Jason Grigsby
 

Plus de Jason Grigsby (20)

The Case for Progressive Web Apps
The Case for Progressive Web AppsThe Case for Progressive Web Apps
The Case for Progressive Web Apps
 
Adapting to Input — Smashing Conference NYC
Adapting to Input — Smashing Conference NYCAdapting to Input — Smashing Conference NYC
Adapting to Input — Smashing Conference NYC
 
Responsive images are here. Now what?
Responsive images are here. Now what?Responsive images are here. Now what?
Responsive images are here. Now what?
 
Adaptive Input — Breaking Development Conference, San Diego
Adaptive Input — Breaking Development Conference, San DiegoAdaptive Input — Breaking Development Conference, San Diego
Adaptive Input — Breaking Development Conference, San Diego
 
Casting Off Our Desktop Shackles
Casting Off Our Desktop ShacklesCasting Off Our Desktop Shackles
Casting Off Our Desktop Shackles
 
The Immobile Web
The Immobile WebThe Immobile Web
The Immobile Web
 
Mobile: The Market, The Web and Windows Phone’s Future
Mobile: The Market, The Web and Windows Phone’s Future Mobile: The Market, The Web and Windows Phone’s Future
Mobile: The Market, The Web and Windows Phone’s Future
 
Native is easy. Mobile web is freaking hard.
Native is easy. Mobile web is freaking hard.Native is easy. Mobile web is freaking hard.
Native is easy. Mobile web is freaking hard.
 
Innotech - Get Me a Mobile Strategy or You’re Fired!
Innotech - Get Me a Mobile Strategy or You’re Fired!Innotech - Get Me a Mobile Strategy or You’re Fired!
Innotech - Get Me a Mobile Strategy or You’re Fired!
 
Where 2.0 -- Get me a mobile strategy or you’re fired!
Where 2.0 -- Get me a mobile strategy or you’re fired!Where 2.0 -- Get me a mobile strategy or you’re fired!
Where 2.0 -- Get me a mobile strategy or you’re fired!
 
Native is easy. Web is essential.
Native is easy. Web is essential.Native is easy. Web is essential.
Native is easy. Web is essential.
 
Journalism and the Future of Mobile
Journalism and the Future of MobileJournalism and the Future of Mobile
Journalism and the Future of Mobile
 
Get Me a Mobile Strategy or You're Fired - Central Oregon Ad Fed
Get Me a Mobile Strategy or You're Fired  - Central Oregon Ad FedGet Me a Mobile Strategy or You're Fired  - Central Oregon Ad Fed
Get Me a Mobile Strategy or You're Fired - Central Oregon Ad Fed
 
Why You Should Make Mobile Your Career | Clark College
Why You Should Make Mobile Your Career | Clark CollegeWhy You Should Make Mobile Your Career | Clark College
Why You Should Make Mobile Your Career | Clark College
 
Google Talk: DOs and DON'Ts of Mobile Strategy
Google Talk: DOs and DON'Ts of Mobile StrategyGoogle Talk: DOs and DON'Ts of Mobile Strategy
Google Talk: DOs and DON'Ts of Mobile Strategy
 
Get Me a Mobile Strategy or You're FIRED!
Get Me a Mobile Strategy or You're FIRED!Get Me a Mobile Strategy or You're FIRED!
Get Me a Mobile Strategy or You're FIRED!
 
Mobile Web vs. Native Apps | Design4Mobile
Mobile Web vs. Native Apps | Design4MobileMobile Web vs. Native Apps | Design4Mobile
Mobile Web vs. Native Apps | Design4Mobile
 
Mobile is the future: Do you have your strategy?
Mobile is the future: Do you have your strategy?Mobile is the future: Do you have your strategy?
Mobile is the future: Do you have your strategy?
 
Get me a mobile strategy or you're fired web 2
Get me a mobile strategy or you're fired   web 2Get me a mobile strategy or you're fired   web 2
Get me a mobile strategy or you're fired web 2
 
Where 2.0 — Native vs Web vs Hybrid: Mobile Development Choices
Where 2.0 — Native vs Web vs Hybrid: Mobile Development ChoicesWhere 2.0 — Native vs Web vs Hybrid: Mobile Development Choices
Where 2.0 — Native vs Web vs Hybrid: Mobile Development Choices
 

Dernier

Dernier (20)

Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 

Mobile First Responsive Design

  • 1. Mobile First Responsive Design Jason Grigsby • @grigs • jason@cloudfour.com http://www.flickr.com/photos/stuart-dootson/4024407198
  • 2. Follow along @grigs Slides: bit.ly/mf-rwd http://www.flickr.com/photos/stevegarfield/4247757731/
  • 3. The web has always been a balancing act… http://www.flickr.com/photos/classblog/5136926303
  • 4. with many competing priorities. http://www.flickr.com/photos/tudor/4324056624/
  • 5. Finding that balance is more difficult… http://www.flickr.com/photos/superfantastic/50088733/
  • 6. as device diversity increases. http://www.flickr.com/photos/lyza/7382235106
  • 7. Responsive web design offers us for a sensible way to deal with device diversity. http://www.flickr.com/photos/darrentunnicliff/4232232092/
  • 8. And yet the one question I frequently ask myself is…
  • 9. Can a one size fits all solution… http://www.flickr.com/photos/sldghmmr/6041481069
  • 10. compete with a tailored experience? http://www.flickr.com/photos/helloturkeytoe/4932748746/
  • 11. Important question from many perspectives:
  • 12. Important question from many perspectives: Search engine optimization Context Advertising Performance
  • 14.
  • 15.
  • 16. What about mobile context? http://www.flickr.com/photos/brunauto/5062644167/
  • 17. 80% during misc downtime 76% while waiting in lines 62% while watching TV 69% for point of sale research http://www.flickr.com/photos/missmeng/5327470961
  • 18. TMI: 39% use phone on the toilet.
  • 19. Advertising? http://www.flickr.com/photos/ sh1mmer/2510487525
  • 20.
  • 23. Shopzilla improves load time 5 seconds http://velocityconf.com/velocity2009/public/schedule/detail/7709
  • 26. BBG: Before Boston Globe http://www.flickr.com/photos/69797234@N06/7203485148/
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32. Media Queries Hide Problems Original Resized K Saved % Saved Holmes 34.7K 8.1K 26.6K 76.6% Watson 39.0K 8.4K 30.6K 78.4% Mycroft 30.5K 6.7K 23.8K 78.0% Moriarty 43.4K 8.2K 35.2K 81.1% Adler 26.0K 6.6K 19.4K 74.6% Winter 34.7K 7.8K 26.9K 77.5% Total 208.3K 45.8K 162.5K 78.0%
  • 33. Crap, that’s not what I was trying to do. https://twitter.com/ldexterldesign/status/55229350299181057
  • 34. What I meant to say: The way in which CSS media queries have been promoted for mobile hides tough problems and gives developers a false promise of a simple solution for designing for multiple screens.
  • 35. The resounding answer from the community: Mobile First Responsive Web Design
  • 36. Mobile First Responsive Web Design http://bradfrostweb.com/blog/web/mobile-first-responsive-web-design/
  • 37. “Awesome. We’ll devote a chapter to Mobile First Responsive Web Design in our book.”
  • 38. “Awesome. We’ll devote a chapter to Mobile First Responsive Web Design in our book.” Famous last words.
  • 39.
  • 40. Where are the Mobile First RWDs? 106 sites from mediaqueri.es tested 9% 4% 25% 21% 4% 38% Mobile is Larger Same Size Less than 10% Savings 11 to 50% Savings 51% to 100% Savings Greater than 100% Savings http://blog.cloudfour.com/where-are-the-mobile-first-responsive-web-designs/
  • 41. Guy Podjarny repeated the experiment a year later. 347 sites from mediaqueri.es tested 3% 11% 86% Same size A bit smaller Much smaller A bit smaller = 50%-90% the size Much smaller = <50% the size http://www.slideshare.net/guypod/performance-implications-of-mobile-design
  • 43.
  • 44. Thankfully Guy took the tests further…
  • 45. Big site, big waterfall 1600x1200 http://www.slideshare.net/guypod/performance-implications-of-mobile-design
  • 46. Small site, big waterfall 320x480 http://www.slideshare.net/guypod/performance-implications-of-mobile-design
  • 47. 1398 elements 1402 elements 3491 nodes 3485 nodes Simplicity not reflected in DOM 1600x1200 320x480 http://www.slideshare.net/guypod/performance-implications-of-mobile-design
  • 50. Most responsive web designs are…
  • 51. Time to pen another fool’s gold post? http://www.flickr.com/photos/myklroventine/3400040943/
  • 52.
  • 54. 5 key techniques for responsible responsive design
  • 55. #1 Build Mobile First Responsive Designs http://www.flickr.com/photos/auyongcheemeng/95769332/
  • 56. Different than Mobile First Design Theory http://www.flickr.com/photos/localcelebrity/4831362933/
  • 57. Mobile First Responsive Web Design http://bradfrostweb.com/blog/web/mobile-first-responsive-web-design/
  • 58. Reorder media queries so cascade goes from small to large screens /* Wider viewports/higher resolutions (e.g. desktop) */ @media screen and (min-width:481px) { [Desktop layout rules here] M ove the mobile media query block } above the desktop media query. By doing this, we’re making S re su the cascading effect of CSfiris /* Mobile/lower-resolution devices */ @media screen and (max-width:480px) { st consistent with our mobile oach. [Mobile layout rules here] progressive enhancement appr } Keep basic styles outside of media queries.
  • 59. The absence of support for media queries is in fact the first media query. —Bryan Rieger, Yiibu
  • 60. Oh come on IE. No love? Because IE 8 and below don’t su media queries, IE isn’t getting t pport CSS rules that create columns. he
  • 61. IE conditional comments <link rel="stylesheet" type="text/css" href="taps.css" /> <link rel="stylesheet" type="text/css" href="layout.css" media="all and (min-width: 481px)"> <!--[if (lt IE 9)&(!IEMobile)]> <link rel="stylesheet" type="text/css" href="layout.css" media="all" /> <![endif]--> The conditional comment repeats the line above it ensuring desktop IE sees our layout.css file.
  • 62. IE conditional comments <link rel="stylesheet" type="text/css" href="taps.css" /> <link rel="stylesheet" type="text/css" href="layout.css" media="all and (min-width: 481px)"> <!--[if (lt IE 9)&(!IEMobile)]> <link rel="stylesheet" type="text/css" href="layout.css" media="all" /> <![endif]--> The conditional comment repeats the line above it ensuring desktop IE sees our layout.css file. or use Respond.js (a media query polyfill for IE)
  • 63. #2 Keep CSS images in their place http://www.flickr.com/photos/lintmachine/2306383943/
  • 64. Images with display:none are still downloaded K making it The taps.jpg file is 440.7 . the largest file on the page @media screen and (max-width:480px) { [Other CSS rules are here] .header {display:none;} }
  • 65. Put CSS images inside media queries to prevent extra downloads @media screen and (min-width:481px){ .header { background:URL('images/taps.jpg') repeat-x; height: 300px; } }
  • 67. #3 Conditionally load JS based on screen size and capabilities http://www.flickr.com/photos/lyza/7382255242/
  • 68. Hiding content with display:none does not prevent it from downloading. Look inside ontap.html to find this code. <iframe id="map" width="300" height="300" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com..."></iframe> This single iframe causes 47 files to be downloaded! Extremely long URL abbreviated taps.css @media screen and (max-width:480px) { . les . There are many more ru . in the css file. #map {display:none;} } The iframe has an id of map. This rule hides the Google Maps iframe by setting the display to none.
  • 71. AJAX Include Pattern <a href="articles/latest/" data-append="articles/latest/fragment" data-media="(min-width: 30em)"> Latest Articles </a> https://github.com/filamentgroup/Ajax-Include-Pattern/
  • 72. #4 Deliver different size <IMG>s at different screen sizes http://www.flickr.com/photos/kk/230544325/
  • 73. One SRC to rule all images On eer labels on thetag There are 16 b hat use an img Despite the need for multiple versions of this image depending on the Tap Now page tr the Bensons Bubbler. screen size, HTML only allows one value for the src. like this one fo <img src="brews_images/bensons_bubbler.jpg" alt="Bensons Bubbler">
  • 74.
  • 75.
  • 76.
  • 77.
  • 78. Things are still moving forward on a standards- based approach for responsive images. http://www.flickr.com/photos/johnlamb/2576062549/
  • 80. Add more on current status of spec.
  • 81. Add more on the questions we still need to answer.
  • 82. Picturefill JavaScript Library <div data-picture data-alt="A giant stone face at The Bayon temple in Angkor Thom, Cambodia"> <div data-src="small.jpg"></div> <div data-src="medium.jpg" data-media="(min-width: 400px)"></div> <div data-src="large.jpg" data-media="(min-width: 800px)"></div> <div data-src="extralarge.jpg" data-media="(min-width: 1000px)"></div> <!-- Fallback content for non-JS browsers. --> <noscript> <img src="small.jpg" alt="A giant stone face at The Bayon temple in Angkor Thom, Cambodia"> </noscript> </div> https://github.com/scottjehl/picturefill
  • 83. Regardless of the img technique you choose, Plan to deprecate it when standards catch up with responsive images.
  • 84. #5 Handle high-density images carefully
  • 85. Downloads both standard and retina images Apple.com as an anti-pattern The total size of the page goes from 502.90K to 2.13MB when the retina versions of images are downloaded. http://blog.cloudfour.com/how-apple-com-will-serve-retina-images-to-new-ipads/
  • 86. If possible, use CSS for now <style> #main { background-size: 400px 250px; } @media screen and (-webkit-device-pixel-ratio: 1) { /* Image for normal displays. */ #main { background-image: url(dog.jpg); } } @media screen and (-webkit-min-device-pixel-ratio: 2) { /* Image for high resolution displays. */ #main { background-image: (dog-hi-res.jpg); } } </style>
  • 87. CSS image-set new proposed spec div.dog { background-image: -webkit-image-set(url(dog.jpg) 1x, url(dog-hi-res.jpg) 2x); }
  • 88.
  • 89. Picturefill User Preference Branch https://github.com/scottjehl/picturefill/tree/user-prefs
  • 90. Large JPEGs with Low Quality Settings? http://blog.netvlies.nl/design-interactie/retina-revolution/
  • 91. SOUTH L TIA STREET DE EN LU SS INC EC AX AJ https://github.com/filamentgroup/Southstreet
  • 92. It’s two years later. Let’s revisit the my original question.
  • 93. Can a one size fits all solution… http://www.flickr.com/photos/theyoungthousands/4025421438
  • 94. compete with a tailored experience? http://www.flickr.com/photos/fronx/2862975043
  • 95. Or will we always end up with something that is too big? http://www.flickr.com/photos/haddadi/5971508861
  • 96. Unlikely responsive design will ever be as fast as something crafted specifically for a device. http://www.flickr.com/photos/quarenta/3256329577
  • 97. But web design is a balancing act. http://www.flickr.com/photos/kalexanderson/6266452817
  • 98. And performance is just one factor.
  • 99. For most projects, responsive design can be fast enough to make sense… Flickr: Uploaded February 11, 2007 by hawridger
  • 100. if we do the extra work to make mobile first responsive designs.
  • 101. Thank You! Special thanks to Scott Jehl, Guy Podjarny, and all of the Flickr users sharing under creative commons. Jason Grigsby • @grigs jason@cloudfour.com Slides: bit.ly/mf-rwd http://www.flickr.com/photos/sualk61/4083223760/