On Github robcbbc / performance-presentation
Welcome.
Group 1 - High rollers - Good devices and connections
Group 2 - High hopers - Good devices, bad connections
Group 3 - Underdogs - Bad devices, bad connections
Requests
Asset sizes
Caching / localStorage
Peru up nearly 250% this year
Peru suffers from s***e internet connections
Co-Creator of SASS
http://bit.ly/sassiefix@media screen and (min-width: 500px) {
↓
@include respond-to(500px) {
core.scss → core.css
compact.scss → compact.css
tablet.scss → tablet.css
wide.scss → wide.css
old-ie.scss → old-ie.css
wide.css
@import '../../partials/base/_wide';
old-ie.css
$media-queries: false; $media-query-free-breakpoint: 900px; @import '../../partials/base/_wide';
modules/timing/timing.js
var perf = window.performance
|| window.msPerformance
|| window.webkitPerformance
|| window.mozPerformance;
...
if (this.getPageLoadTime() > 3000) {
return 'slow';
} else {
return 'fast';
}
Perhaps reduce image quality?
function doImageEnhance () {
if (timingGroup === 'slow') {
//reduce image quality by 25% for slow connections
return new ImageEnhancer('',0.75);
} else {
return new ImageEnhancer();
}
}
Currently, the stylesheets ARE the media queries
/news/1.24.0-556/js/vendor/jquery-2/jquery.min.js
/news/1.24.0-556/js/compiled/all.js
jquery.js + all.js
1 request less and 10-12K smaller