What is responsive - and do I need it?
- 6. Design for one resolution
Bring print to the web (1:1)
Pixelperfect
- 20. „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
- 24. RWD - in a nutshell
https://flic.kr/p/bYxKaN
- 32. Images look a little fuzzy in high
resolutions.
Image Sizes
too small
- 40. Mobile users want compact content
Why should I deliver hidden
content then?
Content
same same but different
- 44. Why load and parse unused
Javascripts and CSS?
Content
Javascripts/CSS
- 45. <!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
- 48. Don’t even think about parallax…
Don’t even think about parallax on
mobile!
Effects
- 51. <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
- 63. It helps a lot, but you still detect
everything at your clients browser!
Modernizr
Swiss army knife?
- 70. Pro
less bloated HTML
only needed scripts will get loaded
Contra
higher server load
device detection is not reliable!
Server-Site Rendering
- 73. 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
- 74. 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
- 75. Websites should be loaded FAST
Websites should have a nice UX
Content should be optimized!
Content should be meaningful!
Why such a hassle?
- 77. 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