SlideShare uma empresa Scribd logo
1 de 43
Baixar para ler offline
Can Media Queries Save Us All?



                       Presented by Tim Kadlec - @tkadlec




                                              http://flic.kr/p/6iMxyT
Friday, May 27, 2011
No*
                       *at least not by themselves




                                                     http://flic.kr/p/7DzC2S
Friday, May 27, 2011
So what’s the problem?




                                           http://flic.kr/p/6Jnxr1
Friday, May 27, 2011
She is.




                       http://flic.kr/p/7c8Nkq
Friday, May 27, 2011
So is this person...   So is the cat



                              http://flic.kr/p/7QPvjg
Friday, May 27, 2011
“         One of the interesting estimates is
                 that there are about 35 billion
                 devices connected to the Internet.
                 Soon, there will be so many that
                 we’ll stop counting.

                                         - Eric Schmidt



Friday, May 27, 2011
http://flic.kr/p/8PGKvr
Friday, May 27, 2011
Option #1: Ignore




                        http://flic.kr/p/coTdy
Friday, May 27, 2011
Option #2: Separate Sites




                                         http://flic.kr/p/8rWoUd
Friday, May 27, 2011
Slight Detour...




                                http://flic.kr/p/9i3TMD
Friday, May 27, 2011
How do we define mobile?




                                http://flic.kr/p/7Er6af
Friday, May 27, 2011
Text
Friday, May 27, 2011
Is this a mobile device?




Friday, May 27, 2011
Is this mobile use?

Friday, May 27, 2011
Form != Function




                                          Text
Friday, May 27, 2011
Option #2: Separate Sites




Friday, May 27, 2011
Option #3: Adapt

                                http://flic.kr/p/2LZPkH
Friday, May 27, 2011
http://www.alistapart.com/articles/responsive-web-design/


                                                                              Text
Friday, May 27, 2011
Friday, May 27, 2011
Device Classification
                       • By device type (feature phones, smart
                         phones, desktop, tv, tablets)

                       • By capabilities ((X)HTML, CSS,
                         Javascript)

                       • By UI mode (touch, pointer)
                       • By resolution
                       • Holistic approach
Friday, May 27, 2011
Don’t Get Too Granular




                                           http://flic.kr/p/99UEu4
Friday, May 27, 2011
/* base styles - optimized for desktop */

                 @media (max-width: 600px) {....}

                 @media (max-width: 400px) {....}

                 @media (min-width: 1300px) {....}




Friday, May 27, 2011
“The absence of
       support for @media
       queries is in fact the                                                        Hi!
       first @media query”




                http://www.slideshare.net/bryanrieger/rethinking-the-mobile-web-by-yiibu
Friday, May 27, 2011
Start with this




Friday, May 27, 2011
/* base styles - optimized for small screens */

                 @media (min-width: 400px) {
                 ....
                 }

                 @media (min-width: 600px) {
                 ....
                 }

                 @media (min-width: 1300px) {
                 ....
                 }

Friday, May 27, 2011
http://filamentgroup.com/lab/
                  respondjs_fast_css3_media_queries_for_internet_explorer_6_8_and_more/


                                                                                          Text
Friday, May 27, 2011
/* base styles - optimized for small screens */

                 @media (min-width: 400px) {
                 ....
                 }/*/mediaquery*/

                 @media (min-width: 600px) {
                 ....
                 }/*/mediaquery*/

                 @media (min-width: 1300px) {
                 ....
                 }/*/mediaquery*/


Friday, May 27, 2011
Performance




                         http://flic.kr/p/713QR9
Friday, May 27, 2011
58% of mobile users expect websites
                 to load as quickly, almost as quickly
                 or faster on their mobile phone,
                 compared to the computer they use
                 at home




Friday, May 27, 2011
http://www.cloudfour.com/css-media-query-for-mobile-is-fools-gold/


                                                                      Text
Friday, May 27, 2011
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%



Friday, May 27, 2011
Responsive Images



Friday, May 27, 2011
<img src='http://src.sencha.io/http://
                 mysite.com/myimage.png' alt='My image'/>

                 <img src='http://src.sencha.io/x50/http://
                 mysite.com/myimage.png' alt='My image'/>



                         http://docs.sencha.com/io/src/

Friday, May 27, 2011
Responsive Images Script



                       <img src="small.jpg?full=large.jpg">




               https://github.com/filamentgroup/Responsive-Images


Friday, May 27, 2011
Assets
                       Responsive Images



Friday, May 27, 2011
By Width


                       if (screen.width >= 320) {
                           // bring the hotness
                       }




Friday, May 27, 2011
By Media Query


                   if (matchMedia('only screen and
                     (max-width: 480px)').matches) {
                       // bring the hotness
                   }

                       https://github.com/paulirish/matchMedia.js/


Friday, May 27, 2011
By Some Combination


                       if (localStorage.supported &&
                         screen.width >= 320) {
                            //bring the hotness
                       }



Friday, May 27, 2011
Combine with Device Detection




                          He said
                          what?




                                    http://flic.kr/p/81vbku
Friday, May 27, 2011
http://flic.kr/p/3HMbN
Friday, May 27, 2011
Summary
                       • Device Classification
                       • Mobile First
                       • Resize Images - don’t just scale
                       • Responsive assets
                       • Pair with device detection
                       • Challenge traditional assumptions
Friday, May 27, 2011
Thank you!

    Tim Kadlec
    http://www.timkadlec.com
    Twitter: @tkadlec




                               http://flic.kr/p/7MhBfD
Friday, May 27, 2011
Sources
                       •   http://www.businessinsider.com/chart-of-the-day-pc-usage-2011-2

                       •   http://www.slideshare.net/OnDevice/the-mobile-only-internet-generation

                       •   http://www.comscore.com/Press_Events/Press_Releases/2011/1/Web-
                           based_Email_Shows_Signs_of_Decline_in_the_U.S._While_Mobile_Email_Usage_on_the_Ris
                           e

                       •   http://internet2go.net/news/data-and-forecasts/pew-85-us-adults-have-mobile-phones-
                           one-ten-high-earners-own-tablets

                       •   http://www.bulletbits.com/slow-sites-and-bad-press/

                       •   http://techcrunch.com/2011/01/25/eric-schmidt-at-dld11-google-will-add-1000-new-
                           employees-in-europe/

                       •   http://www.lukew.com/ff/entry.asp?1258

                       •   http://www.slideshare.net/Gomez_Inc/gomez-mobile-web-experience-survey-why-the-
                           mobile-web-is-disappointing-end-users




Friday, May 27, 2011

Mais conteúdo relacionado

Semelhante a Can Media Queries Save Us All?

The State of Front End Web Development 2011
The State of Front End Web Development 2011The State of Front End Web Development 2011
The State of Front End Web Development 2011Pascal Rettig
 
让开发也懂前端
让开发也懂前端让开发也懂前端
让开发也懂前端lifesinger
 
Networks and online journalism
Networks and online journalismNetworks and online journalism
Networks and online journalismPaul Bradshaw
 
Mobile drupal: building a mobile theme
Mobile drupal: building a mobile themeMobile drupal: building a mobile theme
Mobile drupal: building a mobile themeJohn Albin Wilkins
 
[DCTPE2011] 7) Mobile Drupal(英/中雙語)
[DCTPE2011] 7) Mobile Drupal(英/中雙語)[DCTPE2011] 7) Mobile Drupal(英/中雙語)
[DCTPE2011] 7) Mobile Drupal(英/中雙語)Drupal Taiwan
 
Ember.js - scratching the surface
Ember.js - scratching the surfaceEmber.js - scratching the surface
Ember.js - scratching the surfaceUģis Ozols
 
AngularJS 2.0: A natural evolvement or a new beginning - Boyan Mihaylov - Cod...
AngularJS 2.0: A natural evolvement or a new beginning - Boyan Mihaylov - Cod...AngularJS 2.0: A natural evolvement or a new beginning - Boyan Mihaylov - Cod...
AngularJS 2.0: A natural evolvement or a new beginning - Boyan Mihaylov - Cod...Codemotion
 
Feature Bits at LSSC10
Feature  Bits at LSSC10Feature  Bits at LSSC10
Feature Bits at LSSC10Erik Sowa
 
2011 The Year of Web apps
2011 The Year of Web apps2011 The Year of Web apps
2011 The Year of Web appsJungHyuk Kwon
 
SeaJS - 跨环境模块化开发实践
SeaJS - 跨环境模块化开发实践SeaJS - 跨环境模块化开发实践
SeaJS - 跨环境模块化开发实践lifesinger
 
Campus Party 2010
Campus Party 2010Campus Party 2010
Campus Party 2010Fabio Akita
 
HTML XHTML HTML5
HTML XHTML HTML5HTML XHTML HTML5
HTML XHTML HTML5timstone
 
And suddenly I see ... IDC IT Security Brussels 2011
And suddenly I see ... IDC IT Security Brussels 2011And suddenly I see ... IDC IT Security Brussels 2011
And suddenly I see ... IDC IT Security Brussels 2011wremes
 
Explorable Microscopy OSCon Talk 7/28/11
Explorable Microscopy OSCon Talk 7/28/11Explorable Microscopy OSCon Talk 7/28/11
Explorable Microscopy OSCon Talk 7/28/11annerwright
 
一秒間にソーシャルとモバイルで何が起きているか
一秒間にソーシャルとモバイルで何が起きているか一秒間にソーシャルとモバイルで何が起きているか
一秒間にソーシャルとモバイルで何が起きているかJun Kaneko
 
Mobile apps using drupal as base system SumitK DrupalCon Chicago
Mobile apps using drupal as base system   SumitK DrupalCon ChicagoMobile apps using drupal as base system   SumitK DrupalCon Chicago
Mobile apps using drupal as base system SumitK DrupalCon ChicagoSumit Kataria
 
Scaling atlassian os v4
Scaling atlassian os v4Scaling atlassian os v4
Scaling atlassian os v4Soren Harner
 

Semelhante a Can Media Queries Save Us All? (20)

The State of Front End Web Development 2011
The State of Front End Web Development 2011The State of Front End Web Development 2011
The State of Front End Web Development 2011
 
让开发也懂前端
让开发也懂前端让开发也懂前端
让开发也懂前端
 
Txcto09short
Txcto09shortTxcto09short
Txcto09short
 
Networks and online journalism
Networks and online journalismNetworks and online journalism
Networks and online journalism
 
Mobile drupal: building a mobile theme
Mobile drupal: building a mobile themeMobile drupal: building a mobile theme
Mobile drupal: building a mobile theme
 
[DCTPE2011] 7) Mobile Drupal(英/中雙語)
[DCTPE2011] 7) Mobile Drupal(英/中雙語)[DCTPE2011] 7) Mobile Drupal(英/中雙語)
[DCTPE2011] 7) Mobile Drupal(英/中雙語)
 
Ember.js - scratching the surface
Ember.js - scratching the surfaceEmber.js - scratching the surface
Ember.js - scratching the surface
 
AngularJS 2.0: A natural evolvement or a new beginning - Boyan Mihaylov - Cod...
AngularJS 2.0: A natural evolvement or a new beginning - Boyan Mihaylov - Cod...AngularJS 2.0: A natural evolvement or a new beginning - Boyan Mihaylov - Cod...
AngularJS 2.0: A natural evolvement or a new beginning - Boyan Mihaylov - Cod...
 
Feature Bits at LSSC10
Feature  Bits at LSSC10Feature  Bits at LSSC10
Feature Bits at LSSC10
 
2011 The Year of Web apps
2011 The Year of Web apps2011 The Year of Web apps
2011 The Year of Web apps
 
SeaJS - 跨环境模块化开发实践
SeaJS - 跨环境模块化开发实践SeaJS - 跨环境模块化开发实践
SeaJS - 跨环境模块化开发实践
 
Campus Party 2010
Campus Party 2010Campus Party 2010
Campus Party 2010
 
Blog saisd
Blog saisdBlog saisd
Blog saisd
 
HTML XHTML HTML5
HTML XHTML HTML5HTML XHTML HTML5
HTML XHTML HTML5
 
Tim stone.html5.rjug.20110316
Tim stone.html5.rjug.20110316Tim stone.html5.rjug.20110316
Tim stone.html5.rjug.20110316
 
And suddenly I see ... IDC IT Security Brussels 2011
And suddenly I see ... IDC IT Security Brussels 2011And suddenly I see ... IDC IT Security Brussels 2011
And suddenly I see ... IDC IT Security Brussels 2011
 
Explorable Microscopy OSCon Talk 7/28/11
Explorable Microscopy OSCon Talk 7/28/11Explorable Microscopy OSCon Talk 7/28/11
Explorable Microscopy OSCon Talk 7/28/11
 
一秒間にソーシャルとモバイルで何が起きているか
一秒間にソーシャルとモバイルで何が起きているか一秒間にソーシャルとモバイルで何が起きているか
一秒間にソーシャルとモバイルで何が起きているか
 
Mobile apps using drupal as base system SumitK DrupalCon Chicago
Mobile apps using drupal as base system   SumitK DrupalCon ChicagoMobile apps using drupal as base system   SumitK DrupalCon Chicago
Mobile apps using drupal as base system SumitK DrupalCon Chicago
 
Scaling atlassian os v4
Scaling atlassian os v4Scaling atlassian os v4
Scaling atlassian os v4
 

Último

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
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...apidays
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
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 organizationRadu Cotescu
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 

Último (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
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...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
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
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

Can Media Queries Save Us All?

  • 1. Can Media Queries Save Us All? Presented by Tim Kadlec - @tkadlec http://flic.kr/p/6iMxyT Friday, May 27, 2011
  • 2. No* *at least not by themselves http://flic.kr/p/7DzC2S Friday, May 27, 2011
  • 3. So what’s the problem? http://flic.kr/p/6Jnxr1 Friday, May 27, 2011
  • 4. She is. http://flic.kr/p/7c8Nkq Friday, May 27, 2011
  • 5. So is this person... So is the cat http://flic.kr/p/7QPvjg Friday, May 27, 2011
  • 6. One of the interesting estimates is that there are about 35 billion devices connected to the Internet. Soon, there will be so many that we’ll stop counting. - Eric Schmidt Friday, May 27, 2011
  • 8. Option #1: Ignore http://flic.kr/p/coTdy Friday, May 27, 2011
  • 9. Option #2: Separate Sites http://flic.kr/p/8rWoUd Friday, May 27, 2011
  • 10. Slight Detour... http://flic.kr/p/9i3TMD Friday, May 27, 2011
  • 11. How do we define mobile? http://flic.kr/p/7Er6af Friday, May 27, 2011
  • 13. Is this a mobile device? Friday, May 27, 2011
  • 14. Is this mobile use? Friday, May 27, 2011
  • 15. Form != Function Text Friday, May 27, 2011
  • 16. Option #2: Separate Sites Friday, May 27, 2011
  • 17. Option #3: Adapt http://flic.kr/p/2LZPkH Friday, May 27, 2011
  • 20. Device Classification • By device type (feature phones, smart phones, desktop, tv, tablets) • By capabilities ((X)HTML, CSS, Javascript) • By UI mode (touch, pointer) • By resolution • Holistic approach Friday, May 27, 2011
  • 21. Don’t Get Too Granular http://flic.kr/p/99UEu4 Friday, May 27, 2011
  • 22. /* base styles - optimized for desktop */ @media (max-width: 600px) {....} @media (max-width: 400px) {....} @media (min-width: 1300px) {....} Friday, May 27, 2011
  • 23. “The absence of support for @media queries is in fact the Hi! first @media query” http://www.slideshare.net/bryanrieger/rethinking-the-mobile-web-by-yiibu Friday, May 27, 2011
  • 24. Start with this Friday, May 27, 2011
  • 25. /* base styles - optimized for small screens */ @media (min-width: 400px) { .... } @media (min-width: 600px) { .... } @media (min-width: 1300px) { .... } Friday, May 27, 2011
  • 26. http://filamentgroup.com/lab/ respondjs_fast_css3_media_queries_for_internet_explorer_6_8_and_more/ Text Friday, May 27, 2011
  • 27. /* base styles - optimized for small screens */ @media (min-width: 400px) { .... }/*/mediaquery*/ @media (min-width: 600px) { .... }/*/mediaquery*/ @media (min-width: 1300px) { .... }/*/mediaquery*/ Friday, May 27, 2011
  • 28. Performance http://flic.kr/p/713QR9 Friday, May 27, 2011
  • 29. 58% of mobile users expect websites to load as quickly, almost as quickly or faster on their mobile phone, compared to the computer they use at home Friday, May 27, 2011
  • 31. 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% Friday, May 27, 2011
  • 33. <img src='http://src.sencha.io/http:// mysite.com/myimage.png' alt='My image'/> <img src='http://src.sencha.io/x50/http:// mysite.com/myimage.png' alt='My image'/> http://docs.sencha.com/io/src/ Friday, May 27, 2011
  • 34. Responsive Images Script <img src="small.jpg?full=large.jpg"> https://github.com/filamentgroup/Responsive-Images Friday, May 27, 2011
  • 35. Assets Responsive Images Friday, May 27, 2011
  • 36. By Width if (screen.width >= 320) { // bring the hotness } Friday, May 27, 2011
  • 37. By Media Query if (matchMedia('only screen and (max-width: 480px)').matches) { // bring the hotness } https://github.com/paulirish/matchMedia.js/ Friday, May 27, 2011
  • 38. By Some Combination if (localStorage.supported && screen.width >= 320) { //bring the hotness } Friday, May 27, 2011
  • 39. Combine with Device Detection He said what? http://flic.kr/p/81vbku Friday, May 27, 2011
  • 41. Summary • Device Classification • Mobile First • Resize Images - don’t just scale • Responsive assets • Pair with device detection • Challenge traditional assumptions Friday, May 27, 2011
  • 42. Thank you! Tim Kadlec http://www.timkadlec.com Twitter: @tkadlec http://flic.kr/p/7MhBfD Friday, May 27, 2011
  • 43. Sources • http://www.businessinsider.com/chart-of-the-day-pc-usage-2011-2 • http://www.slideshare.net/OnDevice/the-mobile-only-internet-generation • http://www.comscore.com/Press_Events/Press_Releases/2011/1/Web- based_Email_Shows_Signs_of_Decline_in_the_U.S._While_Mobile_Email_Usage_on_the_Ris e • http://internet2go.net/news/data-and-forecasts/pew-85-us-adults-have-mobile-phones- one-ten-high-earners-own-tablets • http://www.bulletbits.com/slow-sites-and-bad-press/ • http://techcrunch.com/2011/01/25/eric-schmidt-at-dld11-google-will-add-1000-new- employees-in-europe/ • http://www.lukew.com/ff/entry.asp?1258 • http://www.slideshare.net/Gomez_Inc/gomez-mobile-web-experience-survey-why-the- mobile-web-is-disappointing-end-users Friday, May 27, 2011