Native App Awesomeness

(without the native app)
This talk will mostly be about mobile web performance. Sorry if I fooled you and you were hoping for something else.

Rich Trott

There is nothing in this talk that is specific to MWF. The entire talk is about the mobile web generally.

.edu Mobile Web Performance

These numbers are actually pretty good. It's because a lot of these sites are plain and minimal. Which is fine if that's what you're going for. Since you're here, it's probably not what you're going for.

.edu Mobile Web Performance

Min. 1st Qu. Median Mean 3rd Qu. Max.
0.586s 1.778s 2.565s 3.183s 3.554s 36.307s

.edu Mobile vs. Top Web Sites

It's apples and oranges (top sites are not necessarily mobile etc.), but just to get an idea of what's "normal"...

Min. 1st Qu. Median Mean 3rd Qu. Max.
.edu 0.586s 1.778s 2.565s 3.183s 3.554s 36.307s
top 0.570s 2.870s 5.129s 7.798s 8.920s 60.002s
Top sites from mobile.httparchive.org data dump.

Performance Optimization

Optimize what is most important, not what is most interesting. I don't remember who said this. If you know, tell me.

Performance Optimization

Don't do faith-based optimizations. Measure the results. Me
Things I use most often for measurements are:

Things that mattered

(for my site, YMMV)

Things that mattered

HTTP compression

mod_deflate

Things that mattered

Optimize images

ImageOptim

Things that mattered

Eliminate redirects

Things that mattered

Preload large CSS images

<img style="display:none" alt="" src="huge.png">
Don't wait for DOM to be loaded, CSS to load and be parsed and a rule to match before the image is loaded.

Things that mattered

Remove unused JS code

Customize Modernizr

Things that mattered

Defer JS

window.onload = function () {
                var deferred = document.createElement('script');
                deferred.src = 'my.js';
                document.body.appendChild(deferred);
            }

Things that didn't matter

(for my site, YMMV)

Things that didn't matter (for my site)

HTTP Keep-Alives

Things that didn't matter (for my site)

Spriting images

Awesomeness is not just about performance!

HTML5 Offline Appcache

(well, yeah, that's about performance)

HTML5 Offline Appcache

(but it's also about offline availability!)

Warning: Appcache hates responsive images!

For an explanation, see "Gotcha #6" of Jake Archibald's "Application Cache is a Douchebag".

Tried to fix it!

It mostly worked. :-\

I chose appcache over responsive images (for now at least).

LocalStorage \m/

I use it to cache news feeds, events calendars, and your last route in the shuttle trip planner.

Lightning Touch

Your site is probably hideous.

Hire a web designer.
OK, maybe you don't need it if you've made a conscious decision that your site is purely utilitarian. You probably have not made that decision. Don't do a half-hearted job on the look and feel. An OK job makes the site look like it's trying and failing. Take the extra time and hopefully small amount of money required to make it great. People will believe your site functionality is better than it is just because it looks good!

A typical .edu mobile site loads in 2.5s.

Do better than that.
Yes, I'm simplifying here. This is an iPhone over Wi-Fi based on the test results cited earlier, done using webpagetest.org. Obviously, if you load over 3G, it will be slower, etc.

A fast .edu mobile site loads in 1.75s or less.

Do better than that too!
Repeat from previous slide's notes: Yes, I'm simplifying here. This is an iPhone over Wi-Fi based on the test results cited earlier, done using webpagetest.org. Obviously, if you load over 3G, it will be slower, etc.

Selected Resources

/

#