216 points · by feross · 2y ago · 161 comments
IIRC Safari had the flag too that time, not just the Technical Preview.
Apple is using WebXR for the Vision Pro, but it isn't clear if it will ever be available on iPhones.
This makes me suspicious that something has changed to push the balance here, and it must be something to do with trying to offload the execution of LLMs and related neural networks on to clients to reduce the cost of doing it server side.
If a random webpage is asking to use my GPU (especially if it's a sketchy-looking site I just got redirected to), that would raise flags and I'd deny access. If a game or visualization requests access, especially if it's something I've heard others praise, I'd take the risk.
Sure, someone could embed a vulnerability in some decent app which uses the GPU for actual rendering, but it's a lot harder.
I like the permission idea.
I've seen this argument being made quite often. However, I have yet to any evidence given. Can you provide concrete examples of how WebGPU is less secure than WebGL or other web APIs?
By the way, it was tiresome when people told me to go Google answers. It's just as tiresome when people tell me to go ask an AI. I'm here to talk with real people, not computers.
Besides, HN is a place where there's often an expert who will know far more than what's widely available on the web about even the most obscure of technical knowledge.
Source? "GPUs feel low-level like C and C is unsafe" is a vibes argument.
> (The spectre countermeasures around high resolution timing can still bite you).
The fact this is a problem at the highest of levels provides further damning evidence that this isn't a large change to the status quo.
From the preview page:
To enable WebGPU, turn on the “WebGPU”, “GPU Process: DOM Rendering” and “GPU Process: Canvas Rendering” feature flags in the Feature Flags tab in Safari Preferences. If you don’t see the Feature Flags tab, you need to first check “Show features for web developers” in the Advanced tab.
Same here.
Took a beat to realize I was looking at the OP and WebGPU demos in Safari.app instead of Safari Technology Preview.app.
Or was it that metal came from a team in Apple that helped work on WebGPU?
Then the standard changed a bit, but it was still based on modern GPU APIs
Apple plays that game well.
It's not really anything to do with WebGPU in particular.
It is almost a rule with webkit new features.
Those new APIs almost work, but you need to use user-agent detection to make sure it really works and it does not fail randomly/silently when it is in home screen or some other iOS browser.
As with all STP releases, this is the time to report issues before the feature makes it into the next version of Safari.
It just silently fails. UA detection is needed for detecting bug version.
For example Wake lock API has been broken from iOS 16.4 that is like over 9 months.
Or zindex rendering was flickering between iOS 15.7 to 16.4
Some renderings work in Desktop safari but it is different in mobile safari with same version.
It sucks but it is reality of iOS developer experience.
My point is that Apple is competing with other browser implementations on MacOS, yet I’ve very rarely used anything other than Safari. Most exceptions have actually been because I need a plugin to debug the JS framework I’m using.
I read that both Google and Mozilla are developing non webkit iOS browsers in anticipation of some regulatory changes, and also that Apple has been staffing up the webkit/Safari team in response.
If WebKit's market share on iOS were to drop this low, web developers would likely test for WebKit a lot less, and tolerate WebKit's missing features a lot less, and Apple would soon face much worse web compatibility problems on both platforms. To prevent that they saw that they needed to seriously step up their investment in WebKit, and from what I've observed it seems like they did. Though perhaps not yet to the level they really need. Old habits die hard.
Of course they could just do what Microsoft did and give up. I'm glad they haven't.
[1] [Edit: this site was wrong, see below for better numbers]
https://i.imgur.com/lMHkiH8.jpg
"Reload Without Content Blockers" and "Reload Reducing Other Privacy Protections" might be what you need. It might be Safari's anti-tracking/cookie features that might be at fault or it might be that you have a content blocker that's causing an issue. If you're using iCloud Private Relay, it's possible that sites are filtering those IP addresses or there's a DNS issue and you can use "Reload and Show IP Address" to check that. For example, iCloud Private Relay often uses Cloudflare's DNS. archive.is doesn't work with Cloudflare's DNS (because Cloudflare won't leak your location to their DNS servers and so archive.is returns bad results to them).
In Apple's case, I think there's some utility behind their drive for WebGPU: it's basically Apple's Metal graphics API. If WebGPU takes off, it'll mean a lot of developers getting familiar with something very similar to Apple's Metal API. Apple seems to be pursuing a long-term strategy of bringing more games to their platform. From the Game Porting Toolkit to ray tracing in their processors to Apple Vision to simply giving gaming a lot more attention in their keynotes.
And Apple might be well positioned to capitalize on gaming. A $130 Apple TV has a lot more CPU and graphics power than a Nintendo Switch. The same applies to the iPhones people are carrying around. It might not compete with giant consoles from Microsoft and Sony, but Apple has been showing that it can offer impressive gaming performance.
Fast forward to 2026: does a next-gen Apple TV have hardware ray tracing? Apple put a 2021 A15 processor in the 2022 Apple TV. It seems reasonable that they could put something better than a 2023 A17 Pro in a 2026 Apple TV (a 3 year old processor at that point). Sure, Microsoft and Sony will have next-gen consoles, but at what point are graphics facing diminishing returns? Nintendo has the most popular console even though it's older and was low-powered to begin with. For PC games, one must assume that some people are running graphics cards that are older.
I'm not saying this will happen. Companies can be fickle. However, Apple has show a reasonably consistent (if slow) move toward games over the past year or two. They're making the investments now and WebGPU's Metal-like API could be part of that strategy.
Heck, maybe WebGPU is even a strategy to avoid lawsuits from companies like Epic and anti-trust action from regulators. If you don't like the App Store rules, just use WebGPU. If games with native-level graphics can be distributed via the web, then there isn't nearly as much for regulators to go after the App Store.
WebGPU feels like an outlier in that respect but then it is intended as a “better” WebGL so it makes sense that if you already have WebGL you might as well have WebGPU. It’s a lot closer to Apple’s Metal API than WebGL is so they have an interest in people switching.
This came out in the Epic Trial. Those people are much less likely to put a credit card on any random site.
Candy Crush games could already be done on the web on mobile - it wouldn’t be nearly as monetizable
Both companies are working very hard to remove this image though for obvious political reasons.
Apple Pay is only in certain counties, with supported banks/cards. iTunes/App Store supports a plethora of payment options across the world, as well as Apple Pay.
There is literally, for now, zero risk of that. companies will have devs meet the customers where they are at. Of the largest mobile market share platform in the USA doesn’t support PWA or only supports it without features the company requires, said company will build an iOS app. As has been the case.
Application developers will not go anywhere, for many reasons:
- iOS is where the money's at
- PWAs are not "apps". They are web apps with all the limitations it implies. You want complex functionality, rich controls, fluid animations and a billion other things? You go for native apps.
iOS 16.4 added new wake lock api but it does not work in PWA. Still not fixed in iOS 17.2
iOS 17 removed dark/light mode switching in PWA. Still broken in iOS 17.2
My main concern is monetization.
With a PWA the traditional monetization method of selling apps doesn’t work. So, your options will be a subscription or ads.
But, a subscription is too much hustle for small utilities and casual games. And I love apps like Procreate that are paid, without subscription and ad-free.
We're basically there already unfortunately, even for store-distributed software. Apps like Procreate and Pixelmator are a rarity these days.
It definitely doesn't help that the App Store makes charging for new major versions awkward, and that upgrade discounts are basically impossible, but I suspect the main reason is that most developers just make more money from subs than purchases.
As a consumer though, it sucks. Subscriptions are fine if your product has an ongoing cost to you as the developer, for example server or API fees. And I really don't mind JetBrains-style subs, where you can cancel any time and you retain access to the last version you paid for, for as long as it still works on your machine. But, while I appreciate the need for ongoing revenue to continue paying salaries, I am not interested in renting software in perpetuity—that's not a fair deal. Especially when it robs me of the ability to stick with an older version if I prefer it.
How so? Offer to install the pwa and unlock functionality only after the user has paid. How is that different from a paid "app"?
And I haven’t heard anyone say “you know I have a really great experience with web apps. I wish all of my apps were web apps on mobile and Electron on my computer”
I think a part of it is an "app craze", i.e. organizations want "apps" just because "an app" is something fancier and totally different than "just a website". I have done an "app" like this (implemented as an optionally installable website).
Also many people, including many developers, also vastly underestimate what can be done with contemporary browsers, so they assume that "a native app" is needed if you e.g. want to take a picture or read a file.
Like can PWAs run in background or respond to location changes, etc
Not really, no
> There is no real reason to have a native app.
Except, you know, for all the reasons where anything web-based sucks: resources needed to run, fast reaction times, performant animations, rich complex controls etc.
The web, unfortunately, made everyone accept the most limited and under-developed version of what things could be.
On the PWA side, best guess is anti-competition scrutiny.
How could the performance of a web app ever be faster than a native app? That’s impossible.
I'm really doubtful Apple sees Safari as competition for their app store distribution. I don't think that matches reality of how most consumers use mobile devices and spend money.
I don’t think they see Safari as competing with the App Store. Even with the recent PWA additions it doesn’t seem to matter.
At this point I’d say Safari is 100% a hedge against being fully dependent on Google/Chrome. It started to not be dependent on MS/IE and improve what MS didn’t care a ton about.
Apple HATES being fully dependent on others for very important stuff. They’ve been burned too many times.
Safari is great. I love it. But there’s no way it is ever going away even if they are forced to preload 18 different app stores and 4 browsers on every phone by the different governments of the world.
It’s Apple keeping control of Apple’s destiny.
Main issues:
* Since introduction of sandboxing the memory-usage is far too high. It was pretty low before.
* WebRTC. They had it nearly implemented years ago. Then removed it because they were unhappy with it. But their new approach isn’t available until now.
* Many more developers needed. This means me?
* Epiphany releases are linked to GNOME releases. Only applications which are integrated parts of GNOME should do that. The rigid six months release cycle is problematic.
Regarding memory usage. Sandboxing depends on multi-process. The multi-process shouldn’t be an issue. The sandboxing was added in late 2019 and - if I remember correctly - Epiphany started to eat memory. Like probably most people I keep my tabs when closing/opening the Web-browser. The developers are nice and explained, that for all previous existing tabs a separate sandbox process and a render-process is already started with a blank page. And due to need separation no process is allowed to share memory with others. What is needed is only showing a label on the tab until the tab is actually used.And. Midori? There was previously also Midori using WebKitGtk. I liked it and it was pretty nice. But something awkward happened and an unrelated people took over the name and started to ship Electron (i.e. Google Chrome) as “Midori”. It looks untrustworthy to me, I recommend to not install it.
If you use Midori on Archlinux you should be save - they ship and old and original version of Midori. But it is old.
Apple, WebKit and WebKitGtk work together for many years. Good work.
It’s slowly becoming closer to chromium in cutting edge feature support.
The major OS release cadence only seems to affect major UI revamps which aren't that frequent anyway, so it's not that much of a limitation.
You can now also update Safari independently of macOS, which is nice for IT environments that restrict major macOS updates until they have been approved.
Hopefully in the future they will also allow that for iOS, so that older devices that can't update have some more longevity for web apps (and so that we as web developers don't need to support as many older versions)
This is shaping up to be a fun battle ahead.
As a Safari user since release day I never felt like they slowed development or that they have accelerated it lately.
But people are certainly more aware. Maybe it’s more of an “it’s all coming together” for a number of longer term things just hitting around the same time?