Today, a web page can be delivered to a desktop computer, a television, or a handheld device like a tablet or a phone. While a technique like responsive design helps ensure that our web sites look good across that spectrum of screen sizes we may forget our web sites should also be able to perform equally well across that same spectrum. While more and more of our users are shifting their Internet usage to these more varied platforms and connection speeds our development practices might not be keeping up.In this session we’ll review why optimizing web performance should be an important step in the development of responsive websites. We’ll look at the tools that can help you understand and measure the performance of those sites as well as discuss front-end and server-side techniques that can be used to help you improve their performance. Finally, since the best way to test your site is to have real devices in hand, we’ll share “lessons learned” so you can set-up your own device lab similar to what we have at West Virginia University.This presentation builds upon Dave’s “Optimization for Mobile” chapter in Smashing Magazine’s “The Mobile Book.”
4. The Mobile Book
• Covers everything mobile
• Produced by Smashing
Media
• Chapters by Peter-Paul
Koch, Stephanie Rieger,
Brad Frost, Trent Walton,
me & others
http://the-mobile-book.com
5. What I’ll Talk About
• Quick Intro About Why We
Should Care About Web Perf
• How to Add Performance to
Your Workflow
• Setting Up a Device Lab
12. The way in which CSS media
queries have been promoted for
mobile hides tough problems
and gives developers a false
promise of a simple solution for
designing for small screens.
Source: Jason Grigsby on Speakerdeck
“
”- Jason Grigsby
@grigs
18. Introducing the Team
“Dave”
full stack dev
“Adam”
front-end dev
Any resemblance to real persons, living or dead, is purely coincidental. Serious.
19. Parts of a Project
The Six Parts of a Project*
1. First Steps
2.Design & Production
3.Programming
4.Testing
5.Deployment
6.Monitoring
* - For the purposes of this talk.
20. First Steps
The Six Parts of a Project
1. First Steps
2.Design & Production
3.Programming
4.Testing
5.Deployment
6.Monitoring
21. The New Project Should...
1. Look cool
2.Have pizzazz
3.Use brand colors
...
99. Be fast
98. Look good on an iPhone
First Steps
23. Set a Performance Budget
First Steps
A budget is a guide, not a hard & fast limit.
Performance tweaks are compromises.
http://timkadlec.com/2013/01/setting-a-performance-budget/
24. First Steps
Best request is no request.
Worst request is one that
blocks the parser.
Source: Ilya Grigorik
- Ilya Grigorik
@ilyagrigorik
“
”
30. 1. First Steps
2.Design & Production
3.Programming
4.Testing
5.Deployment
6.Monitoring
Design & Performance
The Six Parts of a Project
31. Design & Performance
Things to Keep in Mind...
Images are the devil. Consider using
CSS, sprites, symbol fonts, & SVG.
display: none; is definitely the devil.
Lots of things are the devil. Just
understand the trade-offs when using
social widgets, web fonts & CSS.
The “devil” talk is tongue-in-cheek. Serious.
41. Responsive Images
Most solutions are silly & verbose.
Focus on properly formatting
images. Lazy load them & don’t
worry about “high DPI.”
42. Programming & Performance
The Six Parts of a Project
1. First Steps
2.Design & Production
3.Programming
4.Testing
5.Deployment
6.Monitoring
43. Programming & Performance
Things to Keep in Mind...
JavaScript libraries are devils. Consider
using microjs.com or vanilla JS.
Defer loading of JavaScript. Use
onTouch events when appropriate.
Reflow & repaints are the devil.
The “devil” talk is tongue-in-cheek. Serious.
60. Deployment
The Six Parts of a Project
1. First Steps
2.Design & Production
3.Programming
4.Testing
5.Deployment
6.Monitoring
61. Deployment
Finally getting to “traditional”
performance techniques...
Performance can’t simply be
tacked onto the end of a project.
62. Concatenate files within reason.
Minify files as appropriate.
Make sure the server supports file
compression & cache headers.
Deployment
Things to Keep in Mind...
70. Base on:
WiFi-capable, Analytics
Rank, OS, Screen
Dimensions, & Cost
Suggested focus:
iPod Touch, mid-level
Android, high-end Android,
a tablet, Blackberry,
Windows Phone 7
HOW TO DECIDE WHICH TO GET
iPod Touch w/ Retina
Samsung Fascinate +
Google Nexus One +
$537
Example:
71. WEB PERF TWEEPS TO FOLLOW
@ilyagrigorik
@andydavies
@souders @patmeenan
@stoyanstefanov
@tameverts @yoavweiss@scottjehl
just a sampling...