Responsive Design is Not About Screen Sizes Any More
speckyboy.com
speckyboy.com
http://www.youtube.com/watch?v=YV1nKLWoARQ https://developers.google.com/speed/docs/insights/mobile
I'm currently working on a service in beta to help designers and developer address these issues through monitoring the front-end build of a website over time. Measurement and comparison is the first step in establishing a baseline and then rolling out these techniques and understanding the improvement.
I also discovered CDNConnect recently which looks like a great service to help optimize and generate images at a bunch of different sizes and formats like WebP easily.
Using Opera, Ghostery, and Ad Muncher, if it helps.
It's very seldom I see a mobile version of a site that is better than the desktop version. Mobile versions usually aren't scrollable, so they're much harder to see in overview and zoom into the interesting bit. They usually don't show as much information overall in the interest of reducing clutter, but this makes them harder to scan and navigate.
Mobile Wikipedia commits both of these crimes, and even more annoyingly, mobile Google redirects WP search results to the mobile version, and there's no way to turn this off.
However, I am curious about the research showing that users will leave a website after 3 seconds. Where was this measured? On desktop, or on a low-end/low-bandwidth device? With low-end devices and/or low bandwidth, most websites will load slowly, and my guess is that performance expectations will be different than on desktop.
There's an option to download the full study but it requires registering.
You do what too? Conflating correlation with causation? We all do that at one point or another :) Speed is no doubt important but it's only a part of the big picture. The site I'm maintaining has roughly 60% bounce rate. If I'm to take the "study" at face value, that means all of those bounces are due to 3+ sec load time. And if I somehow manage to bring that to 0.1 sec (preferably using Akamai's services), the bounce rate will magically go to 0%. Of course, that doesn't happen in the real world.
Btw, great article, thanks for taking the time to write it.
All this time we were told 'browser detection is bad', yet... the only real way to give optimal experiences for mobile is... 'browser detection'.
In practice, browser detection is usually necessary, no way around it. Thinking about writing HTML5 audio functionality? Guess what, every browser implements it differently, and you just have to detect the browser so you know whether to respond to the 'ended' event or the 'pause' event, or whether calling load() before playing is necessary, or will crash a certain mobile browser. (I could go on about 100 more things.)
So, in an interview, always explain that browser detection is bad. Once you're hired, you'll find that most reasonably complex sites use it out of necessity.
This also completely contradicts what I thought was the entire point of the article.
Or as I get a lot, you use a non-standard but standards-compliant browser and then have to spoof the user agent of one of the major browsers to persuade the site to actually use the features your browser has.
The first time I came across "Responsive design" it was about using threads to make UI's appear faster.
Here is an article from 2001 talking about it:
http://www.c-sharpcorner.com/UploadFile/hsankar/UIresponsive...
Maybe "flexible design" would've been better. Or something more specific and descriptive.
The fact the DOM is parsed regardless is not a massive issue to me, as mobile browser speed increases this will become a non issue. The issue really is the images, there needs to be some way of telling the browser to completely ignore the image on certain media types, or at least defer the load if it is not meant for this media type then load it last.
There will eventually be a standard for responsive web design but at this moment in time people are doing it the best they can with the tools they have
I still don't buy this "Design for Mobile First" idea though, for a couple of reasons.
- Your first media query is no media query
- This mobile up approach means your responsiveness is dependent on Javascript, which smells funny to me.
- Most websites don't live that long, and desktop users still account for the lions share of traffic. If you had to pick one, you'd probably pick desktop. So it makes sense to me to start there.
- I personally find it easier to work backwards towards mobile. But that's just me.
What don't you like about this?
> This mobile up approach means your responsiveness is dependent on Javascript, which smells funny to me.
Hm... I don't see how a mobile first approach depends on javascript. In my experience, it's quite the opposite, in fact. Mobile first is all about progressive enhancement and starting small. Granted, many web devs build their sites in a way that doesn't work w/o js, but IMHO, this should be the exception not the rule.
> Most websites don't live that long, and desktop users still account for the lions share of traffic. If you had to pick one, you'd probably pick desktop. So it makes sense to me to start there.
If designing mobile first meant "build two websites, and the first one you build should be the mobile one" then I might agree with you. But using RWD means that you only need to have one site, and that it will work across mobile and desktop. Because of the was CSS works, it's just way easier to start with a bare bones style for small screens, and use min-width media queries to progressively add more complex styles for screens with more real estate.
> I personally find it easier to work backwards towards mobile. But that's just me.
I'm shocked to hear that, but obviously can't argue; your experience is your experience. I teach RWD classes, and without exception, students who have dabbled in RWD have had a really hard time trying to shoehorn a desktop site into a mobile format using RWD principles. It's not impossible but it is really painful. I've worked on responsive sites for some of the biggest publishers in the world and I can't imagine how would could have worked from desktop down to mobile. This is because CSS is much easier to use in an additive fashion, as opposed to subtractive.
Just my two cents.
Mobile includes more than phones, it also includes the rapidly expanding tablet form factor.
I think it would be wise to understand where your traffic comes from and how your audience consumes what you provide and pick the best solution for you.
If 70% of your users access your service over mobile, prioritizing desktop over mobile seems very backward! But that's just me.
I see how you could be concerned with the use of javascript but that is part of the progressive enhancement escalation, you just put it on top of your 'ready goodness'!
Also you might be half right about the lions share of traffic. But be sure to check videos by the great Karen McGrane (like this awesome one: http://vimeo.com/50609566). She can argue that most of the new population in occidental first world countries and most of the population in the rest of the world uses mobile as their primary point of access to the internet. To them, mobile is the internet! As she says, if you don't put it on mobile, your content doesn't exist for this people
There's absolutely nothing about mobile-first design that makes your site dependent on JavaScript.
Third point depends ENTIRELY on the site, but your logic doesn't really follow. If I only had to pick HTML or CSS, I'd pick HTML. That doesn't mean I'd launch a site with only HTML and no styling. You're creating a false dilemma.
How so? In my experience it's the complete opposite. You certainly don't need any JS to make a responsive site, besides responsive images if you need it.
The whole point of mobile first is to get low site load, low http requests, JS only when necessary, etc, as to not keep anyone from accessing your content.
I think you have a really distorted view of what mobile-first design is.
Heavyweight responsive websites are unusable. I have to wait indefinitely for page to load, and there's no way to make it load in the background. In the rare cases where the pages progressively display, scrolling is still agony as elements jump around constantly.
While I realize I should probably get a new phone, I'd wager I'm not an edge-case and a lot of users with older or bargain-bin phones face this kind of frustration.
As you said, the solution is for you to get a new phone.
This way as a developer you still have one HTML page, but smaller devices don't ever get non-visible DOM elements.
Instead of setting `display: none` with CSS media queries, make a function to rip out elements with a class like `onlyBig` from the DOM, or better yet, use client side templates and only inject the DOM elements appropriate for that screen to start with.
Designers should let the server side start helping them solve front end problems.
We've developed Pixtulate (http://www.pixtulate.com) to right size and optimize images on the fly before they are sent over the wire. Each visitor, mobile or not, gets the right image for them.
The author is right though, lazy loading of content is key!
Kudos for mentioning inject after load for third party assets. We are a third party monitoring service yourselves (http://fueldeck.com) and we defer loading our script till page load to make sure user experience is not affected. Our customers don't have to worry about that.
Anyone?
m.yourwebsite.com
Firefox started doing it, I think.
For one value of "better": better compression ratio.
LZMA is also much more expensive than GZip (2x CPU when decompressing, 3x to 6x when decompressing) and uses 2 to 100 times the working memory (when decompressing, the compression is worse). GZip also has more or less constant working memory where LZMA2's depends on compression settings.
LZMA2's use case is thus a bit restricted, mostly pre-compressed static assets (ideally not used on mobile devices)
Decompression is fast. I don't think memory is an issue when we're talking about decompressing some HTML/CSS/Javascript, considering it only is required for a few milliseconds to do the work.
CPU is barely an issue, considering how powerful modern mobile devices,
New phones seem to have as much power and as much RAM as my 5 year old PC.
Only works for low-dynamicity response. Or fully static assets.
> Decompression is fast.
I quoted numbers. LZMA decompression takes twice as much CPU time as gzip in the best case.
> I don't think memory is an issue when we're talking about decompressing some HTML/CSS/Javascript
Memory is not a function of payload size in compression algorithms, it's a function of compression parameters. xz -9 will have ~65MB of memory overhead regardless of the payload size (and LZMA is flexible enough that you can craft a single payload requiring gigabytes of working memory, xz's man even warns about it).
> CPU is barely an issue, considering how powerful modern mobile devices
CPU transitions are extremely aggressive on mobiles. The more CPU time has to be spent decompressing payloads the less the CPU can be in deep hibernation state and the more battery you burn through.
Not a tradeoff which makes much sense considering >3G bottlenecks tend to be latency and processing more than bandwidth for "basic" HTML/CSS/JS web content (and really most things outside of video streaming)
> New phones seem to have as much power and as much RAM as my 5 year old PC.
Phones usually can't page out, and aren't tethered to a wall.
Also depends which "new phones" you're looking at, the Firefox OS-based ZTE Open has 256MB RAM and a 1GHz single-core Cortex A5.
In this case, bandwidth is a more scare resource than CPU/RAM.