On device detection and RESS

Written by Jason Grigsby on

I’ve been musing on where device detection and Responsive Design + Server Side Components (RESS) fits in the solution stack as the lines between devices are increasingly blurred.

I would love to see solutions more like what the Riegers presented a couple of years ago at Breaking Development. Solutions that use device detection to inform first load, but then have fallbacks in place if the device detection was wrong.

Enabling solutions like that would allow the best of both worlds. You allow device detection to help you make the best guess at what the device is capable of so you can deliver an optimized experience, but you use client-side detection to redress the errors to ensure that if you get it wrong, you can fix it.

Then device detection truly becomes an enhancement to responsive design—it supercharges it.

BUT, the challenge is that bringing device detection into the mix creates a ton of implementation complexity. That’s why device detection remains something used primarily by large sites.

Here’s my half-baked idea: it would be kind of cool if device detection was running on Node.js and used all of the same API calls that are used client side.

Then you could run the same tests on the server and use it to set the first load code for page, but then execute the same logic in the client and if things didn’t match, you’d know immediately that you needed to fix it. Then you could use the same code on the client that was used on the server to build the correct experience.


Jason Grigsby

Jason Grigsby is one of the co-founders of Cloud Four, Mobile Portland and Responsive Field Day. He spends far too much time obsessing over mobile and the web. Follow him at @grigs.

Never miss an article!

Get Weekly Digests


After reading this a couple times, I’m wondering what somebody would achieve by using client-side _after_ UA detection.

Here’s what I’m thinking: there’s a growing trend with UAs obfuscating themselves, seemingly in order to bypass detection. Given that, we’d still be parsing through features on the client to make sure all of the server-side detection has been correctly attributed. So if the server’s wrong in its detection—which, again, isn’t uncommon—it seems like the browser would need to make more requests. (Unless the server sent all of the necessary data to the client in the first place, which seems like it defeats the point of the hybrid model.)

If the device detection solution is accurate then they'd rarely be a problem with the results being incorrect. Therefore the exception scenario wouldn't occur very often which would boast performance.

A good detection solution should be easy to implement and priced for even the most modest of budgets making the technology accessible to small and medium sites as well.

Does anyone know what the latest Node.js deployment figures are?

Is this the answer to your question from 3 years ago?



Not exactly. At some point I need to write an update to that post. The technical issues I outlined there are true. But I think you can build responsive designs that are performant using progressive enhancement and the techniques are getting better all the time.

Let’s discuss your project! Email Us