SlideShare a Scribd company logo
What is responsive?
And do I need it?
Carsten Sandtner  IPC 2015  @casarock
Carsten
Sandtner
Head of Development
@mediaman GmbH
Web Developer since 1998
@casarock
History!
https://flic.kr/p/9iMKjU
First responsive
Webpage!
The first website!
Print Design!
https://flic.kr/p/8xbEBF
Design for one resolution
Bring print to the web (1:1)
Pixelperfect
What is responsive - and do I need it?
dummy.gif
Floating boxes
https://flic.kr/p/4MFRpB
Finally a solution?
„depends“
=>
https://css-tricks.com/all-about-floats/
1994
Media Queries
HåkonWiumLie
1997
Media Queries: HTML4
considers to include them
2001
Media Queries:
Working draft
mobile
„revolution“
2008
2010
Responsive Web Design
EricMarcotte//Photoby:MartinKraft[CCBY-SA3.0]
http://alistapart.com/article/responsive-web-design
Combination of:
media queries
flexible widths
flexible images
RWD
2010
2012
Media Queries: W3C
Recommendation
Flexbox
https://flic.kr/p/nnnhq3
„The CSS3 Flexible Box, or flexbox, is a
layout mode providing for the
arrangement of elements on a page
such that the elements behave
predictably when the page layout must
accommodate different screen sizes
and different display devices.“
MDN: https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Flexible_boxes
display: box;
~2009
Flexbox (first version)
display: flexbox;
~2011
Flexbox (second version)
display: flex;
> 2011
Flexbox (specification!)
RWD - in a nutshell
https://flic.kr/p/bYxKaN
Liquid:
fluid layout
Adaptive:
pre-defined layout widths
media queries
Definitions
liquid vs. adaptive
Definitions
responsive
http://blog.froont.com/9-basic-principles-of-responsive-web-design/
Combination
„Optimal rendering across devices“Goal
https://flic.kr/p/anLcHu
https://www.youtube.com/watch?v=SpRBvtm_wrQ
What could possibly go
wrong?
Image Sizes
too Big
Megabytes of data!
Even for mobile.
Images look a little fuzzy in high
resolutions.
Image Sizes
too small
Solution?
<img src="fallback.jpg"
srcset="small.jpg 640w 1x,
small-hd.jpg 640w 2x,
large.jpg 1x,
large-hd.jpg 2x"
alt="…">
HTML/CSS
srcset
<picture alt="description">
<source src="small.jpg">
<source src="medium.jpg"
media="(min-width: 40em)">
<source src="large.jpg"
media="(min-width: 80em)">
</picture>
HTML/CSS
picture
Support…
Browser Support
srcset vs. picture
http://caniuse.com
Meanwhile
https://flic.kr/p/fqofd6
Deliver same Content
Why?!
Content
Mobile users want compact content
Why should I deliver hidden
content then?
Content
same same but different
Rearrange Content on different
View Ports?
Content
structure
.some-element {
display: flex;
flex-direction: row;
order: 1;
}
Flexbox FTW!
Browser Support
flexbox
http://caniuse.com
Why load and parse unused
Javascripts and CSS?
Content
Javascripts/CSS
<!DOCTYPE HTML>
<html lang="en-US">
<head>
…
<link rel=“stylesheet" media=“screen
and (min-width: 600px)"
href=“small.css">
<link rel=“stylesheet" media=“screen
and (min-width: 2048px)“
href=“biggest.css">
…
</head>
<body>
…
</body>
</html>
Conditional loading?
CSS
What is responsive - and do I need it?
Back to …
https://flic.kr/p/fqofd6
Don’t even think about parallax…
Don’t even think about parallax on
mobile!
Effects
Javascript
https://flic.kr/p/cvvPLq
<script>
if (document.documentElement.clientWidth > 640) {
document.write('<script src="//ads.com/banner.js"></script>');
document.write('<script src="livechat.js"></script>');
}
</script>
Conditional loading?
<script data-mq="(min-width: 640px)"
data-src="//ads.com/banner.js"></script>
<script data-mq="(min-width: 640px)"
data-src="livechat.js" ></script>
<script>
var scripts = document.getElementsByTagName("script");
for(var i=0;i<scripts.length; i++) {
// Test if the Media Query matches
var mq = scripts[i].getAttribute("data-mq");
if (mq && window.matchMedia(mq).matches) {
// If so, append the new (async) element.
var s = document.createElement("script");
s.type = 'text/javascript';
s.src = scripts[i].getAttribute("data-src");
document.body.appendChild(s);
}
}
</script>
Better
Conditional loading?
https://www.safaribooksonline.com/library/view/responsive-fast/9781491912935/ch04.html
Desktop vs. mobile
https://flic.kr/p/bmJtgf
Mobile first?
Use Case!
Consider
Same content across devices?
Page with a lot of visuals?
Target group?
Target screen size?
Content rich sites
m.domains?
Pro
lightweight
mobile optimized
Con
SEO
„One URL per Page“
redirects
m.domain
Should I….
Client site feature
detection
https://flic.kr/p/ac3oaX
Feature detection
Conditional loading helpers
Modernizr
features
<script>
if (Modernizr.webgl){
doFancyStuff();
} else {
doSlowFancyStuff();
}
</script>
Feature
detection
<script>
Modernizr.load({
test: Modernizr.geolocation,
yep : ['geo.js', 'superfancy.css']
nope: 'geo-polyfill.js'
});
</script>
Conditional
loading
It helps a lot, but you still detect
everything at your clients browser!
Modernizr
Swiss army knife?
RWD starts at your Server
https://flic.kr/p/ac3oaX
Device-Description-Repository
Image optimization
Preprocessing HTML
Server
Viewport
Interaction model (touch?)
Hardware (Sensors)
Device-Description-
Repository
more than screen sizes…
Some Images are
scaleable
some not
Don’t load more than you’re going to show!
Image optimization
Why?
„optimized“ HTML across Screens
Less logic, less Javascript!
Hidden content not necessary
Preprocessing HTML
Serversite rendering
https://flic.kr/p/ac3oaX
reloaded!
Pro
less bloated HTML
only needed scripts will get loaded
Contra
higher server load
device detection is not reliable!
Server-Site Rendering
Best of both
https://flic.kr/p/69ZiLn
Responsive Design +
Server Side Components
1. Get a DDR
2. Write Server-Side Code using
DDR (e.g. conditional loading
etc.)
3. Enhance rendered HTML on
Client-Side
RESS
In a nutshell
1. Get a DDR
2. Detect features on Client-
Side
3. Write Server-Side Code using
DDR (e.g. conditional loading
etc.)
4. Set Cookies, reload.
RESS
In a nutshell
Websites should be loaded FAST
Websites should have a nice UX
Content should be optimized!
Content should be meaningful!
Why such a hassle?
Conclusion
https://flic.kr/p/7Cv2gu
Know your use case
Involve your server
RWD is NOT the holy grail!
sometimes a mobile site makes sense
Don’t forget the user!
Conclusion
Links
https://bradfrost.github.io/this-is-responsive/
http://www.liquidapsive.com/
http://alistapart.com/article/responsive-web-design
https://www.youtube.com/watch?v=XhCXINNvmv8
http://modernizr.com/
Questions?
https://flic.kr/p/qTw4b4
Contact me:
@casarock
hallo@appsbu.de

More Related Content

PPTX
HTML5 - Future of Web
PPTX
PDF
PageCloud Reimagines The Future of Website Creation with Craig Fitzpatrick
PDF
Your Code Is A Waste Of Time (if you don't ask why you are writing it in the ...
PPT
Going Responsive with WordPress
PDF
Agile UX Breakfast Briefing Jun13
PPT
Website Design Principles for Ecommerce
PDF
UX workshop
HTML5 - Future of Web
PageCloud Reimagines The Future of Website Creation with Craig Fitzpatrick
Your Code Is A Waste Of Time (if you don't ask why you are writing it in the ...
Going Responsive with WordPress
Agile UX Breakfast Briefing Jun13
Website Design Principles for Ecommerce
UX workshop

Similar to What is responsive - and do I need it? (20)

PDF
Bruce lawson-over-the-air
PDF
Developing for Mobile Web
KEY
Responsive Design - WordUp Edinburgh 2011
PDF
Always on! ... or not?
PDF
Always on! Or not?
PPTX
CMS & Chrome Extension Development
PDF
Transmission2 25.11.2009
PDF
resume_2016_low_rez
PDF
Web app and more
PDF
Web Apps and more
PPT
Openkapow At Mashup Camp 5
PPTX
Introduction to html5
PDF
Pinkoi Mobile Web
PDF
Web Pages Visual Similarity - Search Central Live Zurich 2024
PDF
Building Mobile Websites with Joomla
PDF
Responsive Design con TYPO3 - T3Camp Italia 2012 Bologna
PDF
Building Micro-Frontends: Scaling Teams and Projects Empowering Developers 1s...
PDF
Responsive webdesign WordCampNL 2012
PDF
Building Micro-Frontends: Scaling Teams and Projects Empowering Developers 1s...
PPTX
A Mobile Solution for #TheUnderdog
Bruce lawson-over-the-air
Developing for Mobile Web
Responsive Design - WordUp Edinburgh 2011
Always on! ... or not?
Always on! Or not?
CMS & Chrome Extension Development
Transmission2 25.11.2009
resume_2016_low_rez
Web app and more
Web Apps and more
Openkapow At Mashup Camp 5
Introduction to html5
Pinkoi Mobile Web
Web Pages Visual Similarity - Search Central Live Zurich 2024
Building Mobile Websites with Joomla
Responsive Design con TYPO3 - T3Camp Italia 2012 Bologna
Building Micro-Frontends: Scaling Teams and Projects Empowering Developers 1s...
Responsive webdesign WordCampNL 2012
Building Micro-Frontends: Scaling Teams and Projects Empowering Developers 1s...
A Mobile Solution for #TheUnderdog
Ad

More from Carsten Sandtner (14)

PDF
State of Web APIs 2017
PDF
Headless in the CMS
PDF
Night Watch with QA
PDF
WebVR - MobileTechCon Berlin 2016
PDF
Evolution der Web Entwicklung
PDF
WebVR - JAX 2016
PDF
HTML5 Games for Web & Mobile
PDF
Web apis JAX 2015 - Mainz
PDF
Web APIs - Mobiletech Conference 2015
PDF
Web APIs – expand what the Web can do
PDF
Firefox OS - A (mobile) Web Developers dream - DWX14
PDF
Firefox OS - A (web) developers dream - muxCamp 2014
PDF
Mozilla Brick - Frontend Rhein-Main June 2014
PDF
Traceur - Javascript.next - Now! RheinmainJS April 14th
State of Web APIs 2017
Headless in the CMS
Night Watch with QA
WebVR - MobileTechCon Berlin 2016
Evolution der Web Entwicklung
WebVR - JAX 2016
HTML5 Games for Web & Mobile
Web apis JAX 2015 - Mainz
Web APIs - Mobiletech Conference 2015
Web APIs – expand what the Web can do
Firefox OS - A (mobile) Web Developers dream - DWX14
Firefox OS - A (web) developers dream - muxCamp 2014
Mozilla Brick - Frontend Rhein-Main June 2014
Traceur - Javascript.next - Now! RheinmainJS April 14th
Ad

Recently uploaded (20)

PPT
Design_with_Watersergyerge45hrbgre4top (1).ppt
PDF
Decoding a Decade: 10 Years of Applied CTI Discipline
PDF
WebRTC in SignalWire - troubleshooting media negotiation
PPTX
Slides PPTX World Game (s) Eco Economic Epochs.pptx
PDF
Introduction to the IoT system, how the IoT system works
PPT
isotopes_sddsadsaadasdasdasdasdsa1213.ppt
PDF
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
PDF
Sims 4 Historia para lo sims 4 para jugar
PPTX
Digital Literacy And Online Safety on internet
PDF
RPKI Status Update, presented by Makito Lay at IDNOG 10
PPTX
PptxGenJS_Demo_Chart_20250317130215833.pptx
PDF
Cloud-Scale Log Monitoring _ Datadog.pdf
PDF
Tenda Login Guide: Access Your Router in 5 Easy Steps
DOCX
Unit-3 cyber security network security of internet system
PPTX
Funds Management Learning Material for Beg
PDF
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
PPTX
SAP Ariba Sourcing PPT for learning material
PDF
Paper PDF World Game (s) Great Redesign.pdf
PPTX
Internet___Basics___Styled_ presentation
PPT
tcp ip networks nd ip layering assotred slides
Design_with_Watersergyerge45hrbgre4top (1).ppt
Decoding a Decade: 10 Years of Applied CTI Discipline
WebRTC in SignalWire - troubleshooting media negotiation
Slides PPTX World Game (s) Eco Economic Epochs.pptx
Introduction to the IoT system, how the IoT system works
isotopes_sddsadsaadasdasdasdasdsa1213.ppt
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
Sims 4 Historia para lo sims 4 para jugar
Digital Literacy And Online Safety on internet
RPKI Status Update, presented by Makito Lay at IDNOG 10
PptxGenJS_Demo_Chart_20250317130215833.pptx
Cloud-Scale Log Monitoring _ Datadog.pdf
Tenda Login Guide: Access Your Router in 5 Easy Steps
Unit-3 cyber security network security of internet system
Funds Management Learning Material for Beg
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
SAP Ariba Sourcing PPT for learning material
Paper PDF World Game (s) Great Redesign.pdf
Internet___Basics___Styled_ presentation
tcp ip networks nd ip layering assotred slides

What is responsive - and do I need it?