Read-only web apps

The most cartoonish misrepresentation of progressive enhancement is that it means making everything work without JavaScript.

No. Progressive enhancement means making sure your core functionality works without JavaScript.

In my book Resilient Web Design, I quoted Wilto:

Lots of cool features on the Boston Globe don’t work when JS breaks; “reading the news” is not one of them.

That’s an example where the core functionality is readily identifiable. It’s a newspaper. The core functionality is reading the news.

It isn’t always so straightforward though. A lot of services that self-identify as “apps” will claim that even their core functionality requires JavaScript.

Surely I don’t expect Gmail or Google Docs to provide core functionality without JavaScript?

In those particular cases, I actually do. I believe that a textarea in a form would do the job nicely. But I get it. That might take a lot of re-engineering.

So how about this compromise…

Your app should work in a read-only mode without JavaScript.

Without JavaScript I should still be able to read my email in Gmail, even if you don’t let me compose, reply, or organise my messages.

Without JavaScript I should still be able to view a document in Google Docs, even if you don’t let me comment or edit the document.

Even with something as interactive as Figma or Photoshop, I think I should still be able to view a design file without JavaScript.

Making this distinction between read-only mode and read/write mode could be very useful, especially at the start of a project.

Begin by creating the read-only mode that doesn’t require JavaScript. That alone will make for a solid foundation to build upon. Now you’ve built a fallback for any unexpected failures.

Now start adding the read/write functionally. You’re enhancing what’s already there. Progressively.

Heck, you might even find some opportunities to provide some read/write functionality that doesn’t require JavaScript. But if JavaScript is needed, that’s absolutely fine.

So if you’re about to build a web app and you’re pretty sure it requires JavaScript, why not pause and consider whether you can provide a read-only version.

Have you published a response to this? :

Responses

Simon R Jones

@adactio read-only web apps is a good idea and is our general approach when building web applications (make sure people can get to the content). Would be something to see the likes of GMail support that!

Thomas Broyer

@adactio That was part of my criticism of @kentcdodds’s https://www.epicweb.dev/the-webs-next-transition with his Twitter Like example: typically the thing I would progressively enhance, and just have it readonly without JS why not.Sites like @thepracticaldev (less “real time” than Twitter or Mastodon) could do similarly and allow commenting without JS too, they unfortunately don’t and feel kinda broken 🤷‍♂️

25 Shares

# Shared by Dan Danowski on Thursday, April 20th, 2023 at 1:00pm

# Shared by Diana K. Bergey on Thursday, April 20th, 2023 at 1:29pm

# Shared by Elly Loel ✨🌱 on Thursday, April 20th, 2023 at 1:29pm

# Shared by Yoram Blumenberg on Thursday, April 20th, 2023 at 3:00pm

# Shared by Fynn Becker on Thursday, April 20th, 2023 at 5:39pm

# Shared by Luke Dary on Thursday, April 20th, 2023 at 7:15pm

# Shared by depone on Thursday, April 20th, 2023 at 7:15pm

# Shared by Khalid ⚡ on Thursday, April 20th, 2023 at 7:16pm

# Shared by Zach Leatherman :11ty: on Thursday, April 20th, 2023 at 7:16pm

# Shared by The Spicy Web on Thursday, April 20th, 2023 at 7:42pm

# Shared by Colin Watson on Thursday, April 20th, 2023 at 7:42pm

# Shared by Baldur Bjarnason on Thursday, April 20th, 2023 at 7:42pm

# Shared by Thomas Broyer on Thursday, April 20th, 2023 at 7:42pm

# Shared by Peter Janes on Thursday, April 20th, 2023 at 8:10pm

# Shared by Alda Vigdís :topspicy: on Thursday, April 20th, 2023 at 8:10pm

# Shared by Torb 🦋 on Thursday, April 20th, 2023 at 8:36pm

# Shared by Sven on Thursday, April 20th, 2023 at 9:03pm

# Shared by Garrett Dimon on Thursday, April 20th, 2023 at 9:04pm

# Shared by Thomas Cannon on Thursday, April 20th, 2023 at 9:04pm

# Shared by Rob Whittaker :thoughtbot: on Thursday, April 20th, 2023 at 9:39pm

# Shared by Brian Richards on Thursday, April 20th, 2023 at 11:45pm

# Shared by Johan Bové on Friday, April 21st, 2023 at 5:37am

# Shared by Nicolas Chevobbe on Friday, April 21st, 2023 at 8:07am

# Shared by Georgimus Prime on Friday, April 21st, 2023 at 10:17am

# Shared by Aaron on Friday, April 21st, 2023 at 11:12am

31 Likes

# Liked by Dan Danowski on Thursday, April 20th, 2023 at 1:00pm

# Liked by Simon R Jones on Thursday, April 20th, 2023 at 1:00pm

# Liked by Elly Loel ✨🌱 on Thursday, April 20th, 2023 at 1:29pm

# Liked by Fred Rocha on Thursday, April 20th, 2023 at 1:29pm

# Liked by Rainer on Thursday, April 20th, 2023 at 1:29pm

# Liked by Tyler Sticka on Thursday, April 20th, 2023 at 3:00pm

# Liked by Ber Baquero Stand 🎸 on Thursday, April 20th, 2023 at 4:33pm

# Liked by Fynn Becker on Thursday, April 20th, 2023 at 5:39pm

# Liked by Luke Dary on Thursday, April 20th, 2023 at 7:16pm

# Liked by Khalid ⚡ on Thursday, April 20th, 2023 at 7:16pm

# Liked by depone on Thursday, April 20th, 2023 at 7:16pm

# Liked by Baldur Bjarnason on Thursday, April 20th, 2023 at 7:42pm

# Liked by Zach Leatherman :11ty: on Thursday, April 20th, 2023 at 7:42pm

# Liked by Anil Dash on Thursday, April 20th, 2023 at 7:42pm

# Liked by Sara Joy ✨ on Thursday, April 20th, 2023 at 7:42pm

# Liked by Thomas Broyer on Thursday, April 20th, 2023 at 7:42pm

# Liked by Antonio Sarcevic on Thursday, April 20th, 2023 at 8:10pm

# Liked by Jason Neel on Thursday, April 20th, 2023 at 8:10pm

# Liked by Torb 🦋 on Thursday, April 20th, 2023 at 8:36pm

# Liked by Grigør on Thursday, April 20th, 2023 at 9:39pm

# Liked by Bob Monsour on Thursday, April 20th, 2023 at 9:39pm

# Liked by maxfenton on Thursday, April 20th, 2023 at 9:39pm

# Liked by Alec Brunelle on Friday, April 21st, 2023 at 4:12am

# Liked by John Brooks on Friday, April 21st, 2023 at 7:33am

# Liked by Nicolas Chevobbe on Friday, April 21st, 2023 at 8:07am

# Liked by Georgimus Prime on Friday, April 21st, 2023 at 10:17am

# Liked by Aaron on Friday, April 21st, 2023 at 11:12am

# Liked by Chris Taylor on Friday, April 21st, 2023 at 2:17pm

# Liked by Christoph Göldner on Saturday, April 22nd, 2023 at 11:38am

# Saturday, April 22nd, 2023 at 3:44pm

# Liked by Alan Dalton on Saturday, April 29th, 2023 at 2:10am

Related posts

Hanging punctuation in CSS

A little fix for Safari.

Web notifications on iOS

The number one feature request I have for mobile Safari is web notifications (even if I won’t personally use them).

Screenshots

Filing an issue for the lazy web. Somebody build this!

Media queries with display-mode

I never would’ve known about the `display-mode` media feature if I hadn’t been writing about it.

Of the web

Baldur Bjarnason has written my mind.

Related links

A microdata enhanced HTML Webcomponent for Leaflet | k-nut — Blog

Here’s a nice HTML web component that uses structured data in the markup to populate a Leaflet map.

Personally I’d probably use microformats rather than microdata, but the princple is the same: progressive enhancement from plain old HTML to an interactive map.

Tagged with

WebKit Features in Safari 17.4 | WebKit

It’s a shame that the newest Safari release is overshadowed by Apple’s shenanigans and subsequent U-turn because there’s some great stuff in there.

I really like what they’re doing with web apps added to the dock:

Safari adds support for the shortcuts manifest member on macOS Sonoma. This gives you a mechanism in the manifest file for defining custom menu commands that will appear in the File menu and the Dock context menu.

Tagged with

daviddarnes/play-button: A Web Component to play audio or video with a button

Isn’t this a lovely little HTML web component? All it does is hook up a button element with an audio or video element: exactly the kind of discrete drudge work that’s good to automate away.

Tagged with

drab

This looks like a handy collection of HTML web components for common interface patterns.

drab does not use the shadow DOM, so you can style content within these elements as usual with CSS.

Tagged with

Web Push on iOS - 1 year anniversary - Webventures

Web Push on iOS is nearing its one year anniversary. It’s still mostly useless.

Sad, but true. And here’s why:

On iOS, for a website to be able to ask the user to grant the push notification permission, it needs to be installed to the home screen.

No other browser on any of the other platforms requires you to install a website for it to be able to send push notifications.

Apple is within their rights to withhold Web Push to installed apps. One could argue it’s not even an unreasonable policy - if Apple made installing a web app at least moderately straightforward. As it is, they have buried it and hidden important functionality behind it.

I really, really hope that the Safari team are reading this.

Tagged with

Previously on this day

2 years ago I wrote More UX London speaker updates

Aleks Melnikova, Stephanie Marsh, Kat Zhou, Sarah Winters, and Adekunle Oduye.

3 years ago I wrote Numbers

“I am not a number, I am a free website!”

3 years ago I wrote The State of the Web — the links

A collection of hyperlinks for a talk.

4 years ago I wrote Overlay gap

A problem shared is a problem halved. And the web has a big problem with awful overlays.

6 years ago I wrote Timing

Thanks, Apple. Thapple.

9 years ago I wrote 100 words 029

Day twenty nine.

17 years ago I wrote Hyperdrive

Last night in San Francisco.

20 years ago I wrote Into the west

I’ve been pretty busy lately and not just with web-related stuff.

21 years ago I wrote WAP

I’ve cobbled together a little WAP version of this journal.

22 years ago I wrote Respec' to the Queen Mum

I’ve avoided any mention of the Queen Mother here, mostly because it doesn’t interest me in the slightest.

22 years ago I wrote Can a Windows guy learn to love the Mac? You bet!

Remember I wrote about the ZDNet journalist who was going to switch over to using a Mac for a month?

22 years ago I wrote Kaliber10000 { The Good Vibe Provider }

Good news: K10K is back.