Cloud Four Blog

Technical notes, War stories and anecdotes

First thing you should do to optimize your desktop site for mobile

Bruce Lawson has great post today called What Users Want from Mobile, and what we can re-learn from them. I highly recommend reading it.

Bruce quotes from a survey of mobile web users and pulls out a few highlights including a huge demand by users for performance. Bruce writes:

This tells us that speed is more important than aesthetics. So perhaps some of the time and effort put into media queries, viewports, avoiding scrolling, line length would actually be better employed reducing HTTP requests and optimising so that websites are perceived to render faster.

Exactly.

This echoes something Brad Frost and I were talking about the last time I was in New York.

If you could only do one thing to prepare your desktop site for mobile and had to choose between employing media queries to make it look good on a mobile device or optimizing the site for performance, you would be better served by making the desktop site blazingly fast.

Most mobile browsers are pretty good about providing tools to help someone utilize a design meant for desktop on a small screen. People can double-tap or pinch and zoom to see and read the content.

But if your site is a bloated mess, there is nothing people can do about it. There is no magical gesture that people can invoke to make something load faster if the developer hasn’t built the site for speed in the first place.

The only gesture they are likely to use involves a single, upright finger as they ditch your site for one that responds to their requests in a timely fashion.

11 Comments on “First thing you should do to optimize your desktop site for mobile”

  1. Speed will always play an important role in how users view your website, and thus, your brand/company/product/etc.

    I would highly recommend looking through Yahoo’s list of best practices for speeding up a web site: http://developer.yahoo.com/performance/rules.html

    Also, starting your project with a mobile first mindset will help decrease loading times overall on your website. Like Luke said, if your site is fast on a mobile device, it will be blazing fast on a desktop device.

    On a side note, do you or anyone else know what was used to concatenate the CSS and JavaScript files on the BostonGlobe.com?

  2. Amen Jason! Can we start a “performance first” rallying cry?

  3. Jason: You made my day! I just shake my head watching slow sites load on my phone. I’m so psyched you’re speaking at Velocity in June. Bring the message!

  4. John Keith says:

    @aaron +1 on the performance first rally! We’ve been pushing that message for many years now, but it’s more important now than ever. “YSlow thinking” is our first line of defense, but there’s so much more. One of my partners at Lucid Meetings (another company of mine) says also that designing with IE7 in mind helps with mobile because you pay better attention to DOM/JS/browser performance in general.

  5. Brett: Looks like Boston Globe did the simplest thing of all. Just concatenate the files together without further minifiaction. Thats just cat *.css > foo.css

    They might have a build system to auto generate the IE/non-IE mutually exclusive style blocks.

    My company uses assetgraph-builder to do that and a lot of other minifications automated: https://github.com/One-com/assetgraph-builder https://github.com/One-com/assetgraph

  6. Scott Jehl says:

    Great post, Jason. Completely agreed. On the framework end of things, we’re trying hard to get jQuery Mobile’s dependencies down so smaller builds are possible. Looks like 12kb gets you plenty of the goodies without specific widgets now, so we’re making progress…

    Brett: On the Globe site, we prototyped with a php/htaccess setup that simply split a comma-separated URL into files and concatenated/minified/gzipped the output. For JS, we loaded only about 5kb up front, which contained feature tests and media query polyfills, from there, we dynamically loaded all the rest of the JS and Ads, so even if they were a little heavier than we’d wanted, they at least would not block an already-usable page from being used.

    In production, The Globe team rebuilt our prototype in their own preferred tech – the solution is easy enough to reproduce, and this doesn’t include the minify part, but you might check out “CSS and Javascript Combinator 0.5 by Niels Leenheer” to help you get the gears churning:

  7. yuiop says:

    where is your mobile version? Hypocrites

    • Jason Grigsby says:

      @yuiop Thanks for the anonymous comment.

      1. We had a mobile version until last week. We got infected by the current wordpress malware that is going around (http://blog.sucuri.net/2012/03/rr-nu-malware-campain-more-details.html). Last week there was no specific vector that the attack was coming from. Ergo, we turned off any plugins that were unnecessary including the one that did theme switching to our mobile theme.

      2. The theme switching plugin is unnecessary because we’re nearing completion of a new responsive site and plan to launch it in the coming days. No need to invest more time in the current site other than to clean up the malware crap.

      3. As the saying goes, the cobbler’s children have no shoes. We’ve spent on our time our client projects and not on our own site. We’re keenly aware of its short comings.

      Finally, thank you for putting us in our place. It’s nice to know you’re looking out for us. Have a pleasant day!

  8. Allan White says:

    “The cobbler’s children have no shoes” – ha! Way to respond with humor.

    I moved quickly away from WPTouch for example – no fun hacking someone else’s CSS, and wanted a lighter mobile site anyway.

    Your site is one of the best in-depth looks at RWD. You’re in Portland? Are you speaking/presenting locally anytime? Would love to say hi sometime.

  9. Jason Grigsby says:

    Thank you Allan. We try to keep our sense of humor.

    You can see our upcoming speaking engagements on our calendar at http://cloudfour.com/about/calendar.html

    We’ll be speaking at WebVisions Portland in May. And you can always catch us at the monthly Mobile Portland meetings.

  10. Prashant says:

    Agreed. Fast loading sites not only make the mobile experience better but also enhance desktop experience.