SlideShare a Scribd company logo
1 of 35
Download to read offline
Optimizing sites for


MOBILE DEVICES
   james williamson | lynda.com
Howdy again y’all

     james williamson

                    | senior author


     @jameswillweb on the Twitter
Today I want to talk about techniques you
can use to plan and develop sites so they
    perform well on mobile devices.


            (it’s kind of a big deal)
We are now in the age of mobile



500 million              180 million        present

Cambrian                 Jurassic       Cupertino
Or are we?
It might be more accurate to call it
“The Age of Constant Connectivity”
This means that over time we need to
change the way we approach design.
 We need a fundamental shift in content
 planning and site architecture to help us
design always-connected user experiences
...but that’s an entirely different presentation
                     (maybe next year)




       However, it’s now critical for you to have a
      strategy in place for how your site looks and
              performs on mobile devices.
So what does that entail?
Changing the way we plan sites to include mobile


Using responsive design techniques that allow flexible layouts


Managing resources responsibly


Taking advantage of device capabilities
Planning for mobile
Mobile needs to be an equal partner, if not the
primary platform you design towards




              Check out Mobile First*
    Popularized by Luke Wroblewski, it emphasizes
    starting the design process with mobile in mind.


                              *http://www.lukew.com/presos/preso.asp?26
Remember contexts when designing
Mobile devices are always on and
always there                            fat-fingers...

                                             44px x 44px
Mobile users are not distracted, not
on-the-go, and not disengaged

Don’t block access because
someone’s on a mobile device

Mobile capabilities increase what you   The Thumb Zone
can do, not limit you!
Use responsive design techniques
                            Fluid grids

                            Media Queries

                            Responsive Images




Responsive Web Design by Ethan Marcotte
http://www.abookapart.com/products/responsive-web-design
Use fluid layouts with breakpoints
desktop                                                                                                                                         tablet                                                                                mobile
                                                                                                                                                                                                                                                  DESOLVE
                 DESOLVE                        fine urban photography                                                                                                           DESOLVE                                              GALLERIES    GEAR    INTERACT     SHOP




  GALLERIES                   GEAR                          INTERACT                        SHOP                                                GALLERIES           GEAR               INTERACT                 SHOP
                                                                                                                                                                                                                                      WE LOVE URBAN PHOTOGRAPHY
  explore our photos   our favorite equipment      contact, follow, or submit your own   buy our stuff
                                                                                                                                                                                                                                      We’re betting you do to. Welcome to
                                                                                                                                                                                                                                      our site, a growing collection of gal-
                                                                                                         We’re betting you do to. Welcome                                                                                             leries taken by a small group of pas-
                                                                                                         to our site, a growing collection of      WE LOVE URBAN PHOTOGRAPHY                                                          sionate urban photographers. Visit our
                                                                                                         galleries taken by a small group of                                                                                          galleries, buy some of our prints, or
                                                                                                         passionate urban photographers.                                                                                              drop us a line. While you’re at it, feel
                                                                                                         Visit our galleries, buy some of our                                                                                         free to submit a gallery of your own.
                                                                                                         prints, or drop us a line. While                                                                                             Welcome.
                                                                                                         you’re at it, feel free to submit a
                                                                                                         gallery of your own. Welcome.




                                                                                                                                                       We’re betting you do to. Welcome to our site, a growing collection of
 WE LOVE URBAN PHOTOGRAPHY                                                                                                                             galleries taken by a small group of passionate urban photographers.
                                                                                                                                                       Visit our galleries, buy some of our prints, or drop us a line. While you’re
                                                                                                                                                       at it, feel free to submit a gallery of your own. Welcome.




Don’t lock breakpoints into fixed sizes (960px, 720px, 320px),
keep layouts fluid within your breakpoints to account for
multiple devices and screen sizes
Calculating percentage-based element widths
For each breakpoint, determine an “ideal” target size
(For example 960px for desktop)


Determine percentages based off this target size


Margin and padding values are calculated as percentages of
the containing block (the parent element)
It’s not always going to be this hard
Flexbox is coming! (http://www.w3.org/TR/css3-flexbox/)


Other layout modules are being designed with mobile in mind
Grid template, CSS Regions, Multi-column Layout, etc.
(check out www.w3.org/Style/CSS/current-work.en.html for more info)
Using Media Queries

     CSS Media Queries allow you to control the
  application of styles based on the presence or
            absence of specific media features



@media	
  only	
  screen	
  and	
  (max-­‐width:480px)	
  {	
  ...	
  }


                                                        like viewport width!
Media Query syntax
    link	
  rel="stylesheet"	
  href="desktop.css"	
  
media="[not	
  |	
  only	
  ]	
  screen	
  [and]	
  (expression)"

                                   or


@media	
  [not	
  |	
  only	
  ]	
  screen	
  [and]	
  (expression)	
  {
                                     	
  	
  	
  }

    The keywords “not”, “only”, and “and” can be used to filter results,
   while expressions can be used to check for specific media features
Media Query syntax
Media Features
width*                       color*
height*                      color-­‐index*
device-­‐width*              monochrome*
device-­‐height*             resolution*
orientation                  scan
aspect-­‐ratio*              grid
device-­‐aspect-­‐ratio*

                           *accepts “min-” and “max-” prefixes
Meta Viewport tags

Meta viewport tags can be combined with media
queries to help ensure consistent experiences.

        CSS @viewport may eventually replace


  <meta	
  name="viewport"	
  content="width=device-­‐width,	
  
  initial-­‐scale=1.0">


                      for example, this meta viewport sets the viewport to the
                               device width and sets the initial zoom to 100%.
Strategies for using media queries
Use inline syntax to reduce http requests

Use width instead of device-width to target viewports

Combine them with global styles for more maintainable code
Responsive Images



    Live
           Wo r m s




     Yeah, that.
Responsive Image challenges
Desktop and mobile layouts usually require different image sizes

Larger images add unnecessary overhead for mobile devices

Screen density differences now allow the use of higher
resolution images for some screens
Responsive Image techniques
Use Background Images
Through media queries, you can change image requests based
on layout (Android 2.3 > still downloads ALL background-images)

Larger decorative background images will clip if inside a fluid
parent element

Since no img element is used, images are non-semantic
Responsive Image techniques
Make images fluid
By setting width or max-width to percentage values, you can
make images scale along with layout

Still forces mobile devices to download large image sizes

Image scaling can harm performance on mobile devices
Responsive Image techniques
Use javascript to replace images
Use javascript to determine which image is appropriate and then
serve that image

Multiple libraries have been created to enable this

Can be tricky to ensure that only the image you want is
downloaded

If the technique requires you to remove the src attribute, your
code become non-semantic
WHATWG to the rescue?!
Recently, the WHATWG added the srcset attribute to the img tag

This allows you to pass a comma separated list of multiple
images and the conditions (width, height, resolution) that trigger
their use

Current unsupported

Ignored the recommendation of the Working Group that
proposed the picture element

Is a big mess
Managing resources

    Why the hell
    isn’t this faster?!!




             Mobile devices deal with a combination of
               varying bandwidth and latency issues.


You can ease your users pain by managing resources wisely.
Fewer server requests are better
Condense multiple CSS and javascript files into single files when
possible

Minify scripts and files and use gzip compression to reduce file size

Use CSS Sprites to limit image requests

Use data-URLs in place of images when feasible

In many instances CSS can be used in place of images
Only load resources if you need them
Often, external scripts won’t be used on pages or on mobile
devices at all

Use asynchronous loading and detection scripts to serve only what
each context needs

There are multiple options available, but Modernizr 2.0 combines
feature detection, media query testing, and yepnope.js to give you
a robust set of options (http://modernizr.com)
Take advantage of mobile capabilities




               Embrace
                the
              Possibilities
Mobile device capabilities
Geolocation
Orientation / Accelerometers
SMS
Touch / Gesture support
Audio & Video capture
OMG! THEY CAN MAKE PHONE CALLS (some of them)



       Thinking about these capabilities during the planning process
               can result in more fulfilling user experiences
HTML5 and standards can help
APIs for Geolocation, Touch Events, and SMS can help
make it easy to add these capabilities to your site

HTML5 form elements are well supported in mobile
browsers

HTML5 audio/video formats are widely supported
Testing...testing...testing
Always test your site on as many browsers and devices
as you can

Emulators are good, but actual devices are better

Pay as close attention to loading times and server
requests as you do page layout or functionality
Testing...testing...testing
Web Inspector Remote (weinre) | remote debugging
http://people.apache.org/~pmuellr/weinre/


Webkit Remote Debugging
http://www.webkit.org/blog/1620/webkit-remote-debugging/


Blaze mobile testing | Mobile performance testing
http://www.blaze.io/mobile
A few things to remember....
Make mobile an equal partner when planning and designing your sites.

Use standards-compliant, clean, accessible code as the foundation for
all your sites.

Create responsive designs that work across multiple screens

Mange resources carefully and limit server requests

Take advantage of device capabilities to enhance user experiences
THANK YOU
james williamson | lynda.com
   jwilliamson@lynda.com
@jameswillweb on the Twitter
  www.simpleprimate.com

More Related Content

Recently uploaded

WAEC Carpentry and Joinery Past Questions
WAEC Carpentry and Joinery Past QuestionsWAEC Carpentry and Joinery Past Questions
WAEC Carpentry and Joinery Past QuestionsCharles Obaleagbon
 
The history of music videos a level presentation
The history of music videos a level presentationThe history of music videos a level presentation
The history of music videos a level presentationamedia6
 
VIP Call Girl Amravati Aashi 8250192130 Independent Escort Service Amravati
VIP Call Girl Amravati Aashi 8250192130 Independent Escort Service AmravatiVIP Call Girl Amravati Aashi 8250192130 Independent Escort Service Amravati
VIP Call Girl Amravati Aashi 8250192130 Independent Escort Service AmravatiSuhani Kapoor
 
Cheap Rate Call girls Malviya Nagar 9205541914 shot 1500 night
Cheap Rate Call girls Malviya Nagar 9205541914 shot 1500 nightCheap Rate Call girls Malviya Nagar 9205541914 shot 1500 night
Cheap Rate Call girls Malviya Nagar 9205541914 shot 1500 nightDelhi Call girls
 
The_Canvas_of_Creative_Mastery_Newsletter_April_2024_Version.pdf
The_Canvas_of_Creative_Mastery_Newsletter_April_2024_Version.pdfThe_Canvas_of_Creative_Mastery_Newsletter_April_2024_Version.pdf
The_Canvas_of_Creative_Mastery_Newsletter_April_2024_Version.pdfAmirYakdi
 
VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...
VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...
VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...Call Girls in Nagpur High Profile
 
Cheap Rate ➥8448380779 ▻Call Girls In Iffco Chowk Gurgaon
Cheap Rate ➥8448380779 ▻Call Girls In Iffco Chowk GurgaonCheap Rate ➥8448380779 ▻Call Girls In Iffco Chowk Gurgaon
Cheap Rate ➥8448380779 ▻Call Girls In Iffco Chowk GurgaonDelhi Call girls
 
Verified Trusted Call Girls Adugodi💘 9352852248 Good Looking standard Profil...
Verified Trusted Call Girls Adugodi💘 9352852248  Good Looking standard Profil...Verified Trusted Call Girls Adugodi💘 9352852248  Good Looking standard Profil...
Verified Trusted Call Girls Adugodi💘 9352852248 Good Looking standard Profil...kumaririma588
 
Call Girls in Kalkaji Delhi 8264348440 call girls ❤️
Call Girls in Kalkaji Delhi 8264348440 call girls ❤️Call Girls in Kalkaji Delhi 8264348440 call girls ❤️
Call Girls in Kalkaji Delhi 8264348440 call girls ❤️soniya singh
 
Kindergarten Assessment Questions Via LessonUp
Kindergarten Assessment Questions Via LessonUpKindergarten Assessment Questions Via LessonUp
Kindergarten Assessment Questions Via LessonUpmainac1
 
Top Rated Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...
Top Rated  Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...Top Rated  Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...
Top Rated Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...Call Girls in Nagpur High Profile
 
CBD Belapur Individual Call Girls In 08976425520 Panvel Only Genuine Call Girls
CBD Belapur Individual Call Girls In 08976425520 Panvel Only Genuine Call GirlsCBD Belapur Individual Call Girls In 08976425520 Panvel Only Genuine Call Girls
CBD Belapur Individual Call Girls In 08976425520 Panvel Only Genuine Call Girlsmodelanjalisharma4
 
DragonBall PowerPoint Template for demo.pptx
DragonBall PowerPoint Template for demo.pptxDragonBall PowerPoint Template for demo.pptx
DragonBall PowerPoint Template for demo.pptxmirandajeremy200221
 
CALL ON ➥8923113531 🔝Call Girls Kalyanpur Lucknow best Female service 🧵
CALL ON ➥8923113531 🔝Call Girls Kalyanpur Lucknow best Female service  🧵CALL ON ➥8923113531 🔝Call Girls Kalyanpur Lucknow best Female service  🧵
CALL ON ➥8923113531 🔝Call Girls Kalyanpur Lucknow best Female service 🧵anilsa9823
 
Dubai Call Girls Pro Domain O525547819 Call Girls Dubai Doux
Dubai Call Girls Pro Domain O525547819 Call Girls Dubai DouxDubai Call Girls Pro Domain O525547819 Call Girls Dubai Doux
Dubai Call Girls Pro Domain O525547819 Call Girls Dubai Douxkojalkojal131
 
SD_The MATATAG Curriculum Training Design.pptx
SD_The MATATAG Curriculum Training Design.pptxSD_The MATATAG Curriculum Training Design.pptx
SD_The MATATAG Curriculum Training Design.pptxjanettecruzeiro1
 
Captivating Charm: Exploring Marseille's Hillside Villas with Our 3D Architec...
Captivating Charm: Exploring Marseille's Hillside Villas with Our 3D Architec...Captivating Charm: Exploring Marseille's Hillside Villas with Our 3D Architec...
Captivating Charm: Exploring Marseille's Hillside Villas with Our 3D Architec...Yantram Animation Studio Corporation
 
Chapter 19_DDA_TOD Policy_First Draft 2012.pdf
Chapter 19_DDA_TOD Policy_First Draft 2012.pdfChapter 19_DDA_TOD Policy_First Draft 2012.pdf
Chapter 19_DDA_TOD Policy_First Draft 2012.pdfParomita Roy
 

Recently uploaded (20)

WAEC Carpentry and Joinery Past Questions
WAEC Carpentry and Joinery Past QuestionsWAEC Carpentry and Joinery Past Questions
WAEC Carpentry and Joinery Past Questions
 
The history of music videos a level presentation
The history of music videos a level presentationThe history of music videos a level presentation
The history of music videos a level presentation
 
VIP Call Girl Amravati Aashi 8250192130 Independent Escort Service Amravati
VIP Call Girl Amravati Aashi 8250192130 Independent Escort Service AmravatiVIP Call Girl Amravati Aashi 8250192130 Independent Escort Service Amravati
VIP Call Girl Amravati Aashi 8250192130 Independent Escort Service Amravati
 
Cheap Rate Call girls Malviya Nagar 9205541914 shot 1500 night
Cheap Rate Call girls Malviya Nagar 9205541914 shot 1500 nightCheap Rate Call girls Malviya Nagar 9205541914 shot 1500 night
Cheap Rate Call girls Malviya Nagar 9205541914 shot 1500 night
 
The_Canvas_of_Creative_Mastery_Newsletter_April_2024_Version.pdf
The_Canvas_of_Creative_Mastery_Newsletter_April_2024_Version.pdfThe_Canvas_of_Creative_Mastery_Newsletter_April_2024_Version.pdf
The_Canvas_of_Creative_Mastery_Newsletter_April_2024_Version.pdf
 
VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...
VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...
VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...
 
Cheap Rate ➥8448380779 ▻Call Girls In Iffco Chowk Gurgaon
Cheap Rate ➥8448380779 ▻Call Girls In Iffco Chowk GurgaonCheap Rate ➥8448380779 ▻Call Girls In Iffco Chowk Gurgaon
Cheap Rate ➥8448380779 ▻Call Girls In Iffco Chowk Gurgaon
 
young call girls in Pandav nagar 🔝 9953056974 🔝 Delhi escort Service
young call girls in Pandav nagar 🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Pandav nagar 🔝 9953056974 🔝 Delhi escort Service
young call girls in Pandav nagar 🔝 9953056974 🔝 Delhi escort Service
 
Verified Trusted Call Girls Adugodi💘 9352852248 Good Looking standard Profil...
Verified Trusted Call Girls Adugodi💘 9352852248  Good Looking standard Profil...Verified Trusted Call Girls Adugodi💘 9352852248  Good Looking standard Profil...
Verified Trusted Call Girls Adugodi💘 9352852248 Good Looking standard Profil...
 
Call Girls in Kalkaji Delhi 8264348440 call girls ❤️
Call Girls in Kalkaji Delhi 8264348440 call girls ❤️Call Girls in Kalkaji Delhi 8264348440 call girls ❤️
Call Girls in Kalkaji Delhi 8264348440 call girls ❤️
 
Kindergarten Assessment Questions Via LessonUp
Kindergarten Assessment Questions Via LessonUpKindergarten Assessment Questions Via LessonUp
Kindergarten Assessment Questions Via LessonUp
 
Top Rated Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...
Top Rated  Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...Top Rated  Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...
Top Rated Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...
 
young call girls in Vivek Vihar🔝 9953056974 🔝 Delhi escort Service
young call girls in Vivek Vihar🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Vivek Vihar🔝 9953056974 🔝 Delhi escort Service
young call girls in Vivek Vihar🔝 9953056974 🔝 Delhi escort Service
 
CBD Belapur Individual Call Girls In 08976425520 Panvel Only Genuine Call Girls
CBD Belapur Individual Call Girls In 08976425520 Panvel Only Genuine Call GirlsCBD Belapur Individual Call Girls In 08976425520 Panvel Only Genuine Call Girls
CBD Belapur Individual Call Girls In 08976425520 Panvel Only Genuine Call Girls
 
DragonBall PowerPoint Template for demo.pptx
DragonBall PowerPoint Template for demo.pptxDragonBall PowerPoint Template for demo.pptx
DragonBall PowerPoint Template for demo.pptx
 
CALL ON ➥8923113531 🔝Call Girls Kalyanpur Lucknow best Female service 🧵
CALL ON ➥8923113531 🔝Call Girls Kalyanpur Lucknow best Female service  🧵CALL ON ➥8923113531 🔝Call Girls Kalyanpur Lucknow best Female service  🧵
CALL ON ➥8923113531 🔝Call Girls Kalyanpur Lucknow best Female service 🧵
 
Dubai Call Girls Pro Domain O525547819 Call Girls Dubai Doux
Dubai Call Girls Pro Domain O525547819 Call Girls Dubai DouxDubai Call Girls Pro Domain O525547819 Call Girls Dubai Doux
Dubai Call Girls Pro Domain O525547819 Call Girls Dubai Doux
 
SD_The MATATAG Curriculum Training Design.pptx
SD_The MATATAG Curriculum Training Design.pptxSD_The MATATAG Curriculum Training Design.pptx
SD_The MATATAG Curriculum Training Design.pptx
 
Captivating Charm: Exploring Marseille's Hillside Villas with Our 3D Architec...
Captivating Charm: Exploring Marseille's Hillside Villas with Our 3D Architec...Captivating Charm: Exploring Marseille's Hillside Villas with Our 3D Architec...
Captivating Charm: Exploring Marseille's Hillside Villas with Our 3D Architec...
 
Chapter 19_DDA_TOD Policy_First Draft 2012.pdf
Chapter 19_DDA_TOD Policy_First Draft 2012.pdfChapter 19_DDA_TOD Policy_First Draft 2012.pdf
Chapter 19_DDA_TOD Policy_First Draft 2012.pdf
 

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Optimizing sites for MOBILE DEVICES

  • 1. Optimizing sites for MOBILE DEVICES james williamson | lynda.com
  • 2. Howdy again y’all james williamson | senior author @jameswillweb on the Twitter
  • 3. Today I want to talk about techniques you can use to plan and develop sites so they perform well on mobile devices. (it’s kind of a big deal)
  • 4. We are now in the age of mobile 500 million 180 million present Cambrian Jurassic Cupertino
  • 5. Or are we? It might be more accurate to call it “The Age of Constant Connectivity”
  • 6. This means that over time we need to change the way we approach design. We need a fundamental shift in content planning and site architecture to help us design always-connected user experiences
  • 7. ...but that’s an entirely different presentation (maybe next year) However, it’s now critical for you to have a strategy in place for how your site looks and performs on mobile devices.
  • 8. So what does that entail? Changing the way we plan sites to include mobile Using responsive design techniques that allow flexible layouts Managing resources responsibly Taking advantage of device capabilities
  • 9. Planning for mobile Mobile needs to be an equal partner, if not the primary platform you design towards Check out Mobile First* Popularized by Luke Wroblewski, it emphasizes starting the design process with mobile in mind. *http://www.lukew.com/presos/preso.asp?26
  • 10. Remember contexts when designing Mobile devices are always on and always there fat-fingers... 44px x 44px Mobile users are not distracted, not on-the-go, and not disengaged Don’t block access because someone’s on a mobile device Mobile capabilities increase what you The Thumb Zone can do, not limit you!
  • 11. Use responsive design techniques Fluid grids Media Queries Responsive Images Responsive Web Design by Ethan Marcotte http://www.abookapart.com/products/responsive-web-design
  • 12. Use fluid layouts with breakpoints desktop tablet mobile DESOLVE DESOLVE fine urban photography DESOLVE GALLERIES GEAR INTERACT SHOP GALLERIES GEAR INTERACT SHOP GALLERIES GEAR INTERACT SHOP WE LOVE URBAN PHOTOGRAPHY explore our photos our favorite equipment contact, follow, or submit your own buy our stuff We’re betting you do to. Welcome to our site, a growing collection of gal- We’re betting you do to. Welcome leries taken by a small group of pas- to our site, a growing collection of WE LOVE URBAN PHOTOGRAPHY sionate urban photographers. Visit our galleries taken by a small group of galleries, buy some of our prints, or passionate urban photographers. drop us a line. While you’re at it, feel Visit our galleries, buy some of our free to submit a gallery of your own. prints, or drop us a line. While Welcome. you’re at it, feel free to submit a gallery of your own. Welcome. We’re betting you do to. Welcome to our site, a growing collection of WE LOVE URBAN PHOTOGRAPHY galleries taken by a small group of passionate urban photographers. Visit our galleries, buy some of our prints, or drop us a line. While you’re at it, feel free to submit a gallery of your own. Welcome. Don’t lock breakpoints into fixed sizes (960px, 720px, 320px), keep layouts fluid within your breakpoints to account for multiple devices and screen sizes
  • 13. Calculating percentage-based element widths For each breakpoint, determine an “ideal” target size (For example 960px for desktop) Determine percentages based off this target size Margin and padding values are calculated as percentages of the containing block (the parent element)
  • 14. It’s not always going to be this hard Flexbox is coming! (http://www.w3.org/TR/css3-flexbox/) Other layout modules are being designed with mobile in mind Grid template, CSS Regions, Multi-column Layout, etc. (check out www.w3.org/Style/CSS/current-work.en.html for more info)
  • 15. Using Media Queries CSS Media Queries allow you to control the application of styles based on the presence or absence of specific media features @media  only  screen  and  (max-­‐width:480px)  {  ...  } like viewport width!
  • 16. Media Query syntax link  rel="stylesheet"  href="desktop.css"   media="[not  |  only  ]  screen  [and]  (expression)" or @media  [not  |  only  ]  screen  [and]  (expression)  {      } The keywords “not”, “only”, and “and” can be used to filter results, while expressions can be used to check for specific media features
  • 17. Media Query syntax Media Features width* color* height* color-­‐index* device-­‐width* monochrome* device-­‐height* resolution* orientation scan aspect-­‐ratio* grid device-­‐aspect-­‐ratio* *accepts “min-” and “max-” prefixes
  • 18. Meta Viewport tags Meta viewport tags can be combined with media queries to help ensure consistent experiences. CSS @viewport may eventually replace <meta  name="viewport"  content="width=device-­‐width,   initial-­‐scale=1.0"> for example, this meta viewport sets the viewport to the device width and sets the initial zoom to 100%.
  • 19. Strategies for using media queries Use inline syntax to reduce http requests Use width instead of device-width to target viewports Combine them with global styles for more maintainable code
  • 20. Responsive Images Live Wo r m s Yeah, that.
  • 21. Responsive Image challenges Desktop and mobile layouts usually require different image sizes Larger images add unnecessary overhead for mobile devices Screen density differences now allow the use of higher resolution images for some screens
  • 22. Responsive Image techniques Use Background Images Through media queries, you can change image requests based on layout (Android 2.3 > still downloads ALL background-images) Larger decorative background images will clip if inside a fluid parent element Since no img element is used, images are non-semantic
  • 23. Responsive Image techniques Make images fluid By setting width or max-width to percentage values, you can make images scale along with layout Still forces mobile devices to download large image sizes Image scaling can harm performance on mobile devices
  • 24. Responsive Image techniques Use javascript to replace images Use javascript to determine which image is appropriate and then serve that image Multiple libraries have been created to enable this Can be tricky to ensure that only the image you want is downloaded If the technique requires you to remove the src attribute, your code become non-semantic
  • 25. WHATWG to the rescue?! Recently, the WHATWG added the srcset attribute to the img tag This allows you to pass a comma separated list of multiple images and the conditions (width, height, resolution) that trigger their use Current unsupported Ignored the recommendation of the Working Group that proposed the picture element Is a big mess
  • 26. Managing resources Why the hell isn’t this faster?!! Mobile devices deal with a combination of varying bandwidth and latency issues. You can ease your users pain by managing resources wisely.
  • 27. Fewer server requests are better Condense multiple CSS and javascript files into single files when possible Minify scripts and files and use gzip compression to reduce file size Use CSS Sprites to limit image requests Use data-URLs in place of images when feasible In many instances CSS can be used in place of images
  • 28. Only load resources if you need them Often, external scripts won’t be used on pages or on mobile devices at all Use asynchronous loading and detection scripts to serve only what each context needs There are multiple options available, but Modernizr 2.0 combines feature detection, media query testing, and yepnope.js to give you a robust set of options (http://modernizr.com)
  • 29. Take advantage of mobile capabilities Embrace the Possibilities
  • 30. Mobile device capabilities Geolocation Orientation / Accelerometers SMS Touch / Gesture support Audio & Video capture OMG! THEY CAN MAKE PHONE CALLS (some of them) Thinking about these capabilities during the planning process can result in more fulfilling user experiences
  • 31. HTML5 and standards can help APIs for Geolocation, Touch Events, and SMS can help make it easy to add these capabilities to your site HTML5 form elements are well supported in mobile browsers HTML5 audio/video formats are widely supported
  • 32. Testing...testing...testing Always test your site on as many browsers and devices as you can Emulators are good, but actual devices are better Pay as close attention to loading times and server requests as you do page layout or functionality
  • 33. Testing...testing...testing Web Inspector Remote (weinre) | remote debugging http://people.apache.org/~pmuellr/weinre/ Webkit Remote Debugging http://www.webkit.org/blog/1620/webkit-remote-debugging/ Blaze mobile testing | Mobile performance testing http://www.blaze.io/mobile
  • 34. A few things to remember.... Make mobile an equal partner when planning and designing your sites. Use standards-compliant, clean, accessible code as the foundation for all your sites. Create responsive designs that work across multiple screens Mange resources carefully and limit server requests Take advantage of device capabilities to enhance user experiences
  • 35. THANK YOU james williamson | lynda.com jwilliamson@lynda.com @jameswillweb on the Twitter www.simpleprimate.com