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

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
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
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
panagenda
 

Recently uploaded (20)

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
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...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
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
 
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
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
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
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
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
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
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
 

Featured

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
Kurio // The Social Media Age(ncy)
 

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)