SlideShare a Scribd company logo
1 of 21
FEDeration July 2012
Lessons Learned Building a
   Responsive Website
http://www.deloittedigital.com.au
Screenshots: http://www.deloittedigital.com.au/work
Our Approach
• Designs for Mobile and Desktop view
• Mobile First
• JS Plugins
    – jQuery 1.7.2
    – FitVids jQuery Plugin
    – Swipe JS (Modified)
• JS for IE
    – Selectivizr
    – Modernizr
    – Respond JS




                                  Artwork: http://shoze.blogspot.com.au/2011/06/brorwser-wars.html
CSS
• Mobile style sheet written first
  (< 507px width)
• Media Queries stylesheet
  containing Desktop styles (>
  507px width)
• Site broke between 507px and
  768px
    – Added a new Breakpoint
      between 508px and 767px
    – Dropped 3 column to 2
      column
    – Realigned text below/above
      images instead of beside



                                     Screenshots: http://www.deloittedigital.com.au
CSS
• We have 3 main layouts
   – Mobile, Tablet, Desktop
• We actually have media query breakpoints at
   –   0px
   –   507px
   –   580px
   –   768px
   –   820px
   –   851px
   –   980px
   –   1380px
• You need to be flexible
Custom JS
• Swipe JS
   – Not reliant on external frameworks (doesn’t need jQuery)
   – Extended to include support for non-webkit browsers
Custom JS
• Responsive Images
   – Completely custom built responsive images script
   – Can be extended using data attributes to resize at custom
     sizes
   – Requires jQuery
JS Frameworks
• We have 3 main frameworks so the site works in IE
   – Selectivizr
      • Makes CSS3 selectors work in older versions of IE
   – Modernizr
      • Makes HTML5 elements work, does some feature detection for
         Video/CSS Transitions/Touch Capabilities
   – Respond JS
      • Makes Media Queries work for IE
      • IMPORTANT: It does this by A JAX loading the CSS again then parsing
         it – can cause issues with proxies/externally stored CSS/load times
Images
• 6 different images per image
   – Mobile/Mobile 2X
   – Tablet/Tablet 2X
   – Desktop/Desktop 2X
• Very difficult to automate
• Created all images at Desktop
  2X, then scaled
   – In some cases had to
     reposition/add whitespace to
     smaller versions of images
Issues found
• Large amounts of cross browser/device testing required
   – A certain device rendered some page elements strangely, but same OS
     version on another device was fine
• iPad downsamples images over 1024px by 1024px
   – To fix, use PNG (huge file size) or Progressive JPEGs
   – Quora: http://is.gd/H4HZ59
• IE8 JS Frameworks
   – Everything worked fine on dev/staging
   – On production IE8 looked like Mobile site only
   – Combination of the three IE JS frameworks caused Respond JS to stop
     working, but only when the URL had www at the start.
   – Newer versions of Respond JS froze IE8
   – Removed Font-Face from Modernizr
What would I do next time?
• Less Boilerstrap JS Shimplate Frameworks
   – Paul Irish removed Respond JS from the HTML5 Boilerplate
     (https://github.com/h5bp/html5-boilerplate/issues/816)
       • Avoid the extra download cost for IE
       • Its awkward to develop mobile first
       • Most commonly used mobile browsers all support media queries
         anyway
   – You can get around using selectivizr by being smart about using CSS
     and writing custom JS to fix the edge cases
• Don’t be responsive for < IE9
   – IE users don’t deserve it. (plus < IE9 can’t support media queries)
   – Less issues related to the frameworks/less unknowns
Other ways to implement
• Mobile first, < IE9 get all styles      • Desktop first, < IE9 ignores
    – Two stylesheets, one with media         – One stylesheet, < IE9 just ignores
      queries, one                              the @media queries as it doesn’t
      withouthttp://nicolasgallagher.co         understand it
      m/mobile-first-css-sass-and-ie/
                                          • Pros
• Pros                                        – No reliance on IE JS frameworks
    – No reliance on IE JS frameworks         – Don’t need to use SASS/SCSS
    – Older mobile browsers see
      mobile site
                                          • Cons
                                              – < IE9 gets lots of unnecessary CSS
• Cons                                        – Older mobile browsers see
    – Requires SASS/SCSS                        desktop site
    – Can be confusing to build mobile
      first
    – < IE9 get lots of unnecessary CSS
    – Need to think lots about CSS
      inheritance
Smoosh them together
• Desktop first, < IE9 doesn’t get media queries
    – Two stylesheets, one with media queries, one without
    – < IE9 only gets the first desktop only stylesheet, the rest get the
      additional ones with the media queries
• Pros
    – No reliance on IE JS frameworks
    – Doesn’t require SASS/SCSS
    – < IE9 doesn’t download additional CSS
• Cons
    – Mobile browsers that don’t support media queries, get the desktop site
Which option is the best?
Depends on the client’s needs
• Which version of the site has higher priority/larger number of visits
  currently?
    – This should determine mobile/desktop first
• Does the client care if < IE9 gets additional page downloads?
    – Mind you, it would be the same amount of downloads as the other
      browsers anyway
• Does the client care if old mobile browsers see the desktop
  version?
    – This should determine mobile/desktop first
• Does the site need to work without JavaScript?
• Does the site need to be Accessible?
No matter if you develop
desktop or mobile first…
UX, Content and Design
should be mobile first
Why mobile first?
• A responsive website starts with a new content strategy. Content
  should be minimized to remove fluff and be more concise.
• UX/Design mobile first gives you the important layout/content
  heirarchy
   – Tablet/desktop should just be a readjustment to layout
• All versions of the site should contain the exact same content
   – Maybe some superfluous content can be removed from the mobile
     (e.g. ads)
Questions?

More Related Content

Recently uploaded

Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
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
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
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 SavingEdi Saputra
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 

Recently uploaded (20)

Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
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...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
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 New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 

Featured

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
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

Featured (20)

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...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 

Lessons learned building a Responsive Website

  • 2. Lessons Learned Building a Responsive Website
  • 5. Our Approach • Designs for Mobile and Desktop view • Mobile First • JS Plugins – jQuery 1.7.2 – FitVids jQuery Plugin – Swipe JS (Modified) • JS for IE – Selectivizr – Modernizr – Respond JS Artwork: http://shoze.blogspot.com.au/2011/06/brorwser-wars.html
  • 6. CSS • Mobile style sheet written first (< 507px width) • Media Queries stylesheet containing Desktop styles (> 507px width) • Site broke between 507px and 768px – Added a new Breakpoint between 508px and 767px – Dropped 3 column to 2 column – Realigned text below/above images instead of beside Screenshots: http://www.deloittedigital.com.au
  • 7. CSS • We have 3 main layouts – Mobile, Tablet, Desktop • We actually have media query breakpoints at – 0px – 507px – 580px – 768px – 820px – 851px – 980px – 1380px • You need to be flexible
  • 8. Custom JS • Swipe JS – Not reliant on external frameworks (doesn’t need jQuery) – Extended to include support for non-webkit browsers
  • 9. Custom JS • Responsive Images – Completely custom built responsive images script – Can be extended using data attributes to resize at custom sizes – Requires jQuery
  • 10. JS Frameworks • We have 3 main frameworks so the site works in IE – Selectivizr • Makes CSS3 selectors work in older versions of IE – Modernizr • Makes HTML5 elements work, does some feature detection for Video/CSS Transitions/Touch Capabilities – Respond JS • Makes Media Queries work for IE • IMPORTANT: It does this by A JAX loading the CSS again then parsing it – can cause issues with proxies/externally stored CSS/load times
  • 11. Images • 6 different images per image – Mobile/Mobile 2X – Tablet/Tablet 2X – Desktop/Desktop 2X • Very difficult to automate • Created all images at Desktop 2X, then scaled – In some cases had to reposition/add whitespace to smaller versions of images
  • 12. Issues found • Large amounts of cross browser/device testing required – A certain device rendered some page elements strangely, but same OS version on another device was fine • iPad downsamples images over 1024px by 1024px – To fix, use PNG (huge file size) or Progressive JPEGs – Quora: http://is.gd/H4HZ59 • IE8 JS Frameworks – Everything worked fine on dev/staging – On production IE8 looked like Mobile site only – Combination of the three IE JS frameworks caused Respond JS to stop working, but only when the URL had www at the start. – Newer versions of Respond JS froze IE8 – Removed Font-Face from Modernizr
  • 13. What would I do next time? • Less Boilerstrap JS Shimplate Frameworks – Paul Irish removed Respond JS from the HTML5 Boilerplate (https://github.com/h5bp/html5-boilerplate/issues/816) • Avoid the extra download cost for IE • Its awkward to develop mobile first • Most commonly used mobile browsers all support media queries anyway – You can get around using selectivizr by being smart about using CSS and writing custom JS to fix the edge cases • Don’t be responsive for < IE9 – IE users don’t deserve it. (plus < IE9 can’t support media queries) – Less issues related to the frameworks/less unknowns
  • 14. Other ways to implement • Mobile first, < IE9 get all styles • Desktop first, < IE9 ignores – Two stylesheets, one with media – One stylesheet, < IE9 just ignores queries, one the @media queries as it doesn’t withouthttp://nicolasgallagher.co understand it m/mobile-first-css-sass-and-ie/ • Pros • Pros – No reliance on IE JS frameworks – No reliance on IE JS frameworks – Don’t need to use SASS/SCSS – Older mobile browsers see mobile site • Cons – < IE9 gets lots of unnecessary CSS • Cons – Older mobile browsers see – Requires SASS/SCSS desktop site – Can be confusing to build mobile first – < IE9 get lots of unnecessary CSS – Need to think lots about CSS inheritance
  • 15. Smoosh them together • Desktop first, < IE9 doesn’t get media queries – Two stylesheets, one with media queries, one without – < IE9 only gets the first desktop only stylesheet, the rest get the additional ones with the media queries • Pros – No reliance on IE JS frameworks – Doesn’t require SASS/SCSS – < IE9 doesn’t download additional CSS • Cons – Mobile browsers that don’t support media queries, get the desktop site
  • 16. Which option is the best?
  • 17. Depends on the client’s needs • Which version of the site has higher priority/larger number of visits currently? – This should determine mobile/desktop first • Does the client care if < IE9 gets additional page downloads? – Mind you, it would be the same amount of downloads as the other browsers anyway • Does the client care if old mobile browsers see the desktop version? – This should determine mobile/desktop first • Does the site need to work without JavaScript? • Does the site need to be Accessible?
  • 18. No matter if you develop desktop or mobile first…
  • 19. UX, Content and Design should be mobile first
  • 20. Why mobile first? • A responsive website starts with a new content strategy. Content should be minimized to remove fluff and be more concise. • UX/Design mobile first gives you the important layout/content heirarchy – Tablet/desktop should just be a readjustment to layout • All versions of the site should contain the exact same content – Maybe some superfluous content can be removed from the mobile (e.g. ads)