r/webdev • • 9h ago

Problems of PWAs

Post image

I'm not a real web developer but still. I posted a blog post about PWAs' (progressive web application) problems as I personally see them
https://terrablog.pages.dev/blog/pwa-problems/

P.S.: I don't use AI to write my posts, so every mistakes are my personal 😅

0 Upvotes

12 comments sorted by

4

u/ChickenOfTheFuture 9h ago

Your first paragraph should explain what a PWA is. Always define acronyms the first time you use them.

-2

u/Konstantin-terrakok 9h ago

Oh! I haven't thought about it. Added. Thanks for the feedback

1

u/Snapstromegon 9h ago

The launcher icon (at least on the pixel android which is very close to vanilla) doesn't shot the browser icon (tested with the spotify, instagram and twitter PWAs). Clearing the browser cache IMO pretty much is like going into the settings and clearing all app data for all apps. It's something you shouldn't do without reason and you can even scope it to specific pages in modern browsers. Also not all browsers include PWA data in "normal" cache clearing runs.

The tie-in to a browser is intentional and I think it's a good thing. This makes it more efficient and the alternative would be that if you uninstall/switch browsers, your PWA just keeps using the old browser internally as a full copy (like electron does). There are PWA function that just don't work cross browser (like notifications, background sync, ...).

PWAs also can control the splashscreen e.g. with color and icon shown.

The wasm compilation is also correct behavior. You are loading the wasm again and it could've changed. Also the compiled wasm changes also with browser versions or even how much you use it, since it's not compiled once and then run the same way forever, but compiled in stages.

For the gestures you are aware of view transitions - right?

Same for the File System Access API that allows reading/writing files without loading it completely into RAM.

For Fonts every good app bundles its own fonts (if it's not a system default font, that PWAs can use too).

The deep link stuff is a browser decision. On my device deep links in chrome easily go to the PWA.

Smooth resizing: This can be quite the opposite too. On my devices the PWAs are most often behaving exactly the same as the native apps (and on my arm device the PWAs are most often behaving massively better than x86 apps without arm versions). This only falls apart when the PWA runs massive JS on resize - but this also fails for native apps.

Also "Firefox does not support PWAs" is wrong. The P in PWA means, that if the PWA opens in the browser at all, it's supported. Using additional functionality like "installing" the PWA to homescreen/desktop should only enable additional features. I agree that the support is limited though.

Safari is also intentionally hindering PWAs all over the place - there are the true problems for PWA - even more than for Firefox.

1

u/Konstantin-terrakok 8h ago

>PWAs also can control the splashscreen 
color - yes. but the icon is the same as for the launcher. And an app name on a splashscreen is not removeable. it fully depends on a browser. and works different between chrome/safari for example.

> The wasm compilation is also correct behavior.
I don't agree. If the app uses cached version of the binary then it can be precompiled already. Further JIT optimisations could be done in background and applied for the next run.

> you are aware of view transitions 
Yes. It is not possible to bind them to Predictive Back Gesture on Android

>File System Access API 

Haven't heard about it! Thank you. As I understand it requires to provide an access to a some directory first (through a system dialog).

1

u/Snapstromegon 8h ago

The true trick for splash screens is, to have the app launch an empty shell immediatly, so that the splash screen is not a core peace of the experience. But yes there are limitations and browser specific stuff.

I do not believe that giving developers explicit control over the cache would speed things up. By the way: Chromium has been caching compiled WASM out of the box for years automatically: https://v8.dev/blog/wasm-code-caching This is IMO the correct way - it should be invisible to the developer.

You're right, you can't "hijack" the normal animation to sync to the existing animations, but you can (at least in many cases) run your own touchbind to run your own animations and look for navigation events for global ones.

Yes, for files that are not for your app - just like with some native app restrictions right now. There is the OPFS for your own apps stuff just like native's app local storage.

1

u/stuntscript 8h ago

The Safari / iOS gap is honestly still the biggest practical headache with PWAs. Even when an app works great offline, iOS's 7-day eviction of script-writable storage (IndexedDB/localStorage) in normal browser tabs—plus having to explain the manual 'Share -> Add to Home Screen' dance instead of a real install prompt—trips up non-technical users constantly. Calling navigator.storage.persist() and giving users a quick manual export/backup option ends up being essential if the app holds anything they care about.

1

u/TheOfficeWM 7h ago

Caching is the one that bites me. An update goes out and half the users are still on the old version until they hard refresh. Versioning the assets helped more than anything else.

1

u/Knightjesse3 6h ago

A small browser/OS matrix would make the problems much easier to act on. The same PWA feature can behave quite differently on iOS Safari and Android Chrome.

1

u/mop_with_a_cup 6h ago

These aren't technical problems tho, more about unregulated monopolists that don't want to introduce technology that cuts into their political program.

Wish you would have written about this in the blog as the technical merits are not interesting to me, what is interesting is why companies like Apple + Google are so adamant about controlling their ecosystems at the expense of people.

Nice blog!

1

u/GoldsteinEmmanuel 6h ago

I think your expectations are unrealistic.

You want Web applications to behave in every way like Native applications, and that's not possible because the World Wide Web is a document publishing system and not a general purpose operating system.

1

u/Ok_Statistician_997 5h ago

iOS Safari is stil the main pain point imo. Push notificatinos, background sync, storage limits, all behave differently there than on Android or desktop. Also app store discoverability is basically zero, so you're relying on users remembering to add to home screen. Offline caching sounds great until you hit edge cases with stale data and have to build your own invalidation logic by hand.