Websites in the dock

I updated my Mac to the newest operating system, Sonoma. I did this to try out the new “add to Dock” feature in Safari. It’s like the “add to Homescreen” action on iOS.

Before I get into what’s good, I have to start by ranting about a big problem on both desktop and mobile: discovery.

First of all, you have to know that a square with an arrow sticking out of it means “share”.

Okay, I can buy it. It’s no better or worse than the three horizontal lines of a hamburger icon, or the three horizontal dots of a kebab icon. And whereas the hamburger and kebab icons are used as a catch-all cupboard to sweep all your rubbish into, at least this icon has a specific meaning. It means share, right?

Well, it used to. But now it’s also home to “add to Homescreen” and “add to Dock”. Neither of those actions are sharing.

Stretching semantics, I suppose you could say you’re sharing something with yourself.

Anyway, this is the biggest issue with progressive web apps on both iOS and Mac. Regardless of how well they work, there’s not much point if most people don’t know the option exists.

(Update: Jen rightly points out that you can also get to “add to Dock” from the file menu. Doh! How did I miss that‽)

Discovery aside, I was interested to see how Safari handles web apps on desktop compared to how Chrome does it.

I’ve had one or two web apps in my dock for a while, installed through Chrome. Google Meet is one of them. I use it quite a bit, and honestly it feels no different to using a native desktop app.

One annoyance is that the Chrome browser also automatically launches whenever I launch the Google Meet icon in my dock. This wouldn’t matter if Chrome were my default browser, but I use Firefox. So whenever I’m using the Google Meet web app, there’s a Google Chrome icon hanging around in my dock, saying “gizza job, I can do that.”

I opened Google Meet in Safari and then selected “add to Dock” from the square with an arrow sticking out of it. Then I quit Safari. I was delighted to see that when I launched the Google Meet web app from the dock, it didn’t automatically launch Safari! Excellent!

Even better, links within a Safari-installed web app respect your default browser choice. What I mean is, previously when I had Google Meet installed via Chrome, if I clicked an external link in Google Meet it opened in Chrome. But now with the Google Meet installed via Safari, external links open in Firefox, my browser of choice. Very good!

But the Safari-installed version of Google Meet is, alas, over-zealous with permissions. I have to grant access to my microphone and camera every single time I launch it. Previously—with the version installed via Chrome—it remembered my choice.

Now I don’t know if the behaviour in the Safari-installed version is a deliberate choice made for security reasons, or if it’s a bug. I suspect it’s a bug. After all, on iOS you get access to more permissions if a site is added to the homescreen—it’s the only way to ask for permissions for notifications, for example.

I added a few more sites to my dock: mastodon.social and thesession.org. They both work really well as standalone apps.

Interestingly, if I click a link to thesession.org from within the mastodon.social standalone web app (or the other way around), the link opens in my default browser. So the web apps don’t “own” the domains. That’s fine, although I wonder if it violates the principle of least surprise—perhaps the expectation is that the installed web app is the preffered owner of that link.

I also tried adding Google Calendar to my dock. Ironically, I can only do this with Safari. For some reason, Google have chosen not to make their calendar a progressive web app …which means there’s no option to install it from Google Chrome.

They’re missing a trick there. It’s the perfect candidate for being a standalone app.

Actually, I take that back. Gmail is the perfect candidate for being a standalone app …and yet it’s not a progressive web app. Very odd!

With Safari, you can add any website to the dock. It doesn’t need to be a progressive web app. But the installation experience works best if there’s a manifest file pointing to some nice icons.

As it turned out, Google Calendar runs like an absolute dog in Safari (and therefore as a Safari-installed web app). Before you cry conspiracy, note that it runs absolutely fine in Firefox. I know because I use it in Firefox every day. But I can’t add it to my dock from Firefox because Mozilla turned their back on progressive web apps a while back. A bad decision.

Google Calendar isn’t the only thing that runs slowly in Safari’s engine. This page on The Session has a very large DOM and a badly-coded in-page search (I know, I know, I need to improve it). It works fine in other browsers but Safari struggles mightily.

(Update: I tried using Google Calendar from Safari again and it seems to be running just fine now. Maybe I caught it on a bad day? In any case, I’ve added it to the dock now and it’s feeling good as a standalone app.)

Still, aside from a few annoying little things around permissions and performance—and the situation with discovery—it feels great to have websites that act just like other apps. I like that some of the icons in my dock are native, some are web apps, and I mostly don’t notice the difference.

I wonder if there’s much point using wrappers like Electron any more? I feel like they were mostly aiming to get that parity with native apps in having a standalone application launched from the dock.

Now all you need is a website.

Responses

Jen Simmons

@adactio > You have to know that a square with an arrow sticking out of it means “share”.

Did you see that “Add to Dock…” is in the File menu?

# Posted by Jen Simmons on Tuesday, October 3rd, 2023 at 6:07pm

nicolas

@adactio Firefox on mobile does have it. But I agree that it’s disappointing that Mozilla isn’t putting more focus into desktop web apps. They used to have Mozilla Prism in the late 2000s, which was doing just that, quite early on!

# Posted by nicolas on Wednesday, October 4th, 2023 at 10:38am

Avatar of Jj

I used to want to have some sites windowed outwide of my main browser window, but more and more I’m find

ben

@adactio the permissions thing is a little annoying but in safari preferences you can set it (per-site) to “allow” rather than “ask”. (At least, I presume this is the same for the in-dock version as for safari in general.)

# Posted by ben on Wednesday, October 4th, 2023 at 7:50pm

glod.org

# Wednesday, October 4th, 2023 at 10:48pm

geoffgraham.me

It can be done either by clicking the Share button in Safari’s toolbar or from the File menu.

Source

# Wednesday, October 4th, 2023 at 11:04pm

Cory Birdsong

@adactio you are definitely right about the share menu - it has always been conceptually muddy. Really more of a “do something with this” junk drawer.

www.trysmudford.com

Jeremy recently blogged about “Websites in the dock”, a feature in the latest Mac OS that allows you to add a progressive web application to your dock, effectively rendering it as a desktop application. Chrome has supported this for a while, but it had an annoying side-effect of launching Chrome alongside the PWA, awkwardly showing how the magic trick was really working.

Safari, however, lets you load this application entirely standalone. There’s no trace of the web browser once you’ve installed the application through “File → Add to Dock”. There’s a custom application icon, with a custom name. When you open the application, it remembers whatever size/shape you left the window last time. When you supply the standalone attribute in the manifest file, the application loads without a browser bar, back button or bookmarks. And the application is called whatever name you supply in the Mac toolbar. For all intents and purposes, this is a desktop application created without a single line of Swift or Objective-C, or any heavy Electron wrappers.

Oh, and the application can work offline! Service workers, and browser storage are more than stable enough to handle a variety of offline loading patterns. These are truly exciting times to be building for the web!

Putting it to the test

Naturally, I had to give this a go. After upgrading to Sonoma, I booted up Visual Studio Code and wrote a quick website. My colleague Chris and I have been discussing how frustrating it is to add those posh unicode arrows (↑↗→) and how we always end up googling ‘unicode right arrow’ and copying from an ad-laden page.

No more! arrows.trysmudford.com is my new home for all those symbols that are hard to remember. Need an Interrobang in your life‽ Grab it from the site. Are you regularly reaching for ≠? Add it as a custom symbol and never search again.

The stack is intentionally simple. There’s no build script. There’s no JS framework. There’s a HTML file and a Service Worker that keeps it working offline. localStorage is used to hold any custom icons a user may choose to store. And there’s a manifest file that tells the system which icons to use when saving the site as an application. It’s stored on GitHub, and hosted on Netlify. I even deployed it to the internet from my phone.

Sit with that for a second, you can write a desktop application with no tooling, launch it from your phone to the internet for free, and seconds later install it on any computer. I didn’t have to ask permission, or jump through any App Store hoops. I wrote a thing, pushed it to the internet, and then I could use the thing. Even better, I could send the link to Chris and he could use the thing. That’s the power of the internet.

# Wednesday, November 22nd, 2023 at 12:00am

5 Shares

# Shared by Julius Schröder on Tuesday, October 3rd, 2023 at 6:17pm

# Shared by Schmidt on Tuesday, October 3rd, 2023 at 6:17pm

# Shared by GenXJamerican 🇯🇲 🇺🇸 on Tuesday, October 3rd, 2023 at 6:17pm

# Shared by Fynn Becker on Tuesday, October 3rd, 2023 at 6:17pm

# Shared by Axel Rauschmayer on Wednesday, October 4th, 2023 at 8:18am

16 Likes

# Liked by Elliot Jay Stocks on Tuesday, October 3rd, 2023 at 6:17pm

# Liked by Schmidt on Tuesday, October 3rd, 2023 at 6:17pm

# Liked by Florian Geierstanger on Tuesday, October 3rd, 2023 at 6:17pm

# Liked by Fynn Becker on Tuesday, October 3rd, 2023 at 6:17pm

# Liked by Simon Cox :SEO: on Tuesday, October 3rd, 2023 at 6:47pm

# Liked by Chris Armstrong on Tuesday, October 3rd, 2023 at 6:47pm

# Liked by Theresa O’Connor on Tuesday, October 3rd, 2023 at 6:47pm

# Liked by Chris Coyier on Tuesday, October 3rd, 2023 at 6:48pm

# Liked by Roma Komarov on Tuesday, October 3rd, 2023 at 7:17pm

# Liked by Sunny :autumnleaf6: on Tuesday, October 3rd, 2023 at 8:16pm

# Liked by Carlos Cuéllar on Wednesday, October 4th, 2023 at 4:56am

# Liked by Cesare Pautasso on Wednesday, October 4th, 2023 at 9:50am

# Liked by Dolev Hadar on Wednesday, October 4th, 2023 at 9:50am

# Liked by Jordan Austin on Wednesday, October 4th, 2023 at 10:14am

# Liked by nicolas on Wednesday, October 4th, 2023 at 10:47am

# Liked by Bohdan on Thursday, October 5th, 2023 at 2:12pm

Related posts

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).

A bug with progressive web apps on iOS

Opening an external link in a web view appears to trigger a reload of the parent page without credentials.

The web on my phone

How do you solve a problem like Safari?

Home screen

The web is getting progressively enhanced.

Alternative stylesheets

Why do browsers that don’t implement stylesheet switching still download alternative stylesheets?

Related links

My comments to Competition and Markets Authority on mobile browser competition - Alistair Shepherd

A thoughtful response to the current CMA consultation:

The inability to compete with native apps using Progressive Web Apps fully—particularly on iOS—also has a big impact on my work and the businesses I have worked with. Progressive Web Apps are extremely accessible for development, allowing for the creation of a simple app in a fraction of the time and complexity of a native app. This is fantastic for allowing smaller agencies and businesses to innovate on the web and on mobile devices and to reach consumers. However the poor support for PWA features by Safari and by not allowing them in the App Store, Apple forces app development to be difficult, time consuming and extremely expensive. I have spoken with many companies who would have liked an app to compete with their larger competitors but are unable to afford the huge costs in developing a native app.

Get your response in by Friday by emailing browsersandcloud@cma.gov.uk.

Tagged with

News from WWDC22: WebKit Features in Safari 16 Beta | WebKit

Good news and bad news…

The good news is that web notifications are coming to iOS—my number one wish!

The bad news is that it won’t happen until next year sometime.

Tagged with

Open Web Advocacy

A grassroots coalistion of web developers lobbying to get Apple to allow fair competition on iOS.

We have identified the #AppleBrowserBan as the number one threat to the future of the open web.

Tagged with

The Optional Chaining Operator, “Modern” Browsers, and My Mom - Jim Nielsen’s Blog

This is something I bump against over and over again: so-called evergreen browsers that can’t actually be updated because of operating system limits.

From what I could gather, the version of Chrome was tied to ChromeOS which couldn’t be updated because of the hardware. No new ChromeOS meant no new Chrome which meant stuck at version 76.

But what about the iPad? I discovered that my Mom’s iPad was a 1st generation iPad Air. Apple stopped supporting that device in iOS 12, which means it was stuck with whatever version of Safari last shipped with iOS 12.

So I had two older browsers that couldn’t be updated. It was device obsolescence because you couldn’t install the latest browser.

Websites stop working and the only solution is to buy a whole new device.

Tagged with

Back to the Bad Old Days of the Web – Jorge Arango

We’ve enjoyed a relatively long period when we didn’t have to think about which browser to use. Alas, that period is ending: I must now keep Chrome running all the time, much like I needed that PC in the early 2000s.

Tagged with

Previously on this day

4 years ago I wrote 200 tunes

A tune a day, every day, for 200 days.

5 years ago I wrote Travel talk

Edinburgh, Madrid, London, Amsterdam—plane versus train.

8 years ago I wrote Fifteen

I should’ve baked a cake, at least.

11 years ago I wrote Science Hack Day San Francisco

Getting excited and making things with science in the best possible venue.

15 years ago I wrote Thoughtful

A gentle reminder from Last.fm.

17 years ago I wrote Web Fundamentals

Speaking and listening at Fundamentos Web 2007.

21 years ago I wrote Coca Crazy

Coca-Cola have unveiled a giant hi-tech billboard in Picadilly Circus with all sorts of gee-whiz gadgetry:

23 years ago I wrote Berners-Lee Says Patents Obstruct An Open Web

More news on yesterday’s post about the W3C and patents.