The Web always wins

比特客栈的寻行数墨
3 min readOct 13, 2016

--

Usually around the time when users are moving on.

History repeats itself, often not because people have forgotten history, but because they remember it too vividly. So smart people end up premature optimizing for the wrong kind of disasters.

The web, as it turns out, suffers from the same problem:

  • The web won the desktop war, but didn’t realize users were moving on to mobile platforms.
  • The web once had IE pushing its frontiers, but didn’t realize it would end up becoming the defacto standard.
  • The web once were static and text-based, but are now expected to be interactive as well as multi-media.

It’s human instinct to prioritize pain avoidance. So smart people came up with great solutions:

  • Responsive Design
  • Living Standards
  • Web Apps

Like an old saying in Chinese: tearing down the east wall to mend the west one. The combination of these solutions backfired, in a way any decent programmers can predict: Complexity.

Complex solutions weren’t built in a day, quite the opposite, they are fruits of human ingenuity:

  • Responsive design is hard, so we go mobile first.
  • Standards take time to land, so we polyfill and ponyfill.
  • Web Apps share basic features, so we create frameworks, then modules, then built tools, to streamline development.

No complexity can pile on forever. We all know we have to repay our debt at some point. Yet we carry on like it’s a necessary evil, until Don Unstable Network comes knocking on our doors.

It would seem that we enjoy our front-end development lifestyle a bit too much, in that we don’t want to admit it may causes obesity. So smart people come up with yet another genius solution: Offline First.

The point of offline-first, to quote Nolan Lawson, is to “optimize for conditions where the network is unavailable”.

And it does work, in the many examples he provides, offline-first will probably improve users’ offline experience greatly.

But here is my counter argument:

To truly be offline-first, you must optimize first-load experience.

Delay content display until your lovely crafted JavaScript bundles are loaded and parsed, is not the way to improve first-load experience.

And here comes my controversial statement:

Offline-first is the web’s latest attempt to avoid admitting its complexity has gone too far, insofar as it doubles down on such complexity by asking for a persistent runtime environment on users’ devices.

To me, many existing offline-first implementations are trading first-visit experience for repeat-visit performance. They operate on 2 assumptions:

  1. Most of your users will want to come back.
  2. Most of your users wouldn’t prefer a native app.

My experience as a user/developer/business owner suggests neither were true, and they are increasingly untrue for sites not in the Alexa Top 100.

Why is Progressive Enhancement, even the narrower HTML-first option, still widely applicable in 2016?

Let me put it this way:

  • Our users have never asked for Progressive Enhancement or Progressive Web App to exist.
  • All they wanted were fast, usable, responsive services.
  • But us, developers, seem to want something slightly different.
  • We want to give users those features, while not losing our own sanity.

Seriously, offline-first advocates can knock progressive enhancement for its hypocrisy all day long, and it won’t change the fact that PE is simpler than PWA, and more resilient than PWA.

Dropping PE for PWA feels like reaching for the stars while riding on a water rocket.

More complexity, more maintenance, for an endless competition with native apps?

The web always wins. I just hope we make it in time.

Disclaimer: I would like to add more links to explain my argument but I am also working under a deadline, apologize for skimming a lot of details.

--

--