Hacker News new | past | comments | ask | show | jobs | submit login

Honestly, I'm all in for PWAs in favour of Chrome Apps. To the final user, a PWA will work the same: an icon and a chrome-less window. However, they are built on top of open standards, so any browser can support PWAs and provide the same experience to their users, unlike Chrome apps, which only were supposed to work in Chrome. I hope that in the transition, we see more and more progressive web applications.

PWAs have replaced a few native apps on my phone and I couldn't be happier about it. I can use Twitter, Telegram, YouTube and even read HN (via the Premii webapp [1]) through a fullscreen interface that behaves like a native application (no address bar, tinted notifications bar, push notifications for Twitter and Telegram), but that nonetheless is still a browser.

Support for PWAs on Firefox for Android is around the corner. I'm a Firefox Nightly user and the support is there: websites that have a webapp manifest display an icon on the address bar to let you quickly "install" the application as an icon to the homescreen. It is supposed to reach stable channel on Firefox 58 [2].

[1]: http://hn.premii.com/ [2]: http://www.androidpolice.com/2017/10/24/firefox-58-will-let-...

The big plus for Chrome Apps for me was that the store made it possible to actually get new users for your apps. For organizations without $ this was useful as a good app would get good visibility once it had a lot of happy users and got good reviews. This was probably a good thing both for users and developers.

Now we instead have to pay Google for ads to get visibility for our PWA. Now we're probably going to turn to Facebook and try to get some traction there.. From one evil walled garden into the next!

> Now we're probably going to turn to Facebook and try to get some traction there..

And that is why the web is dying.

You have an alternative to offer? Facebook is where the users are. What is your non-facebook approach to get visibility from new users?

Local seems to be the next frontier. As in, a storefront. What's old is new again (again)!

And don't forget about public relations. Spend some time with your future users!

The problem with PWAs is they do not provide the same access as a Chrome App (file system, sockets...) so it is not a replacement for those Apps using that functionality.

Just another case of Chrome running in like a bull and doing one thing then breaking it later. :(

Anyone who needs the low level functionality will end up with a native app that use native messaging to talk to Chrome. Or just stands alone.

Actually you are so right... And I do not understand why google doesn't seem to solve that problem...

I mean I really like PWAs. But while they are around since a while now (about 2 years?), the pain points have not been addressed so far.

- Privacy: There are multiple issues related to privacy here (transparent updates, Serviceworker running in the background without the user knowing about it), and when I see it how many serviceworkers my browser runs already I am happy that they don't have an even deeper access to my system.

- Ownership: Installing a PWA works like visiting a website twice. After that you have no idea what you have (version? offline capabilities? storage?). And if you decide to use an App for a while you are living in the constant danger of the web service quitting.

- Storage: While many people do not care where their data is stored (proprietary service XYZ, AWS, Google Drive, DropBox). I would like to be able select my storage location myself. Furthermore, I think the storage topic is also one of the main reasons why people build electron apps, as the browser has no robust and user friendly way of accessing the filesystem.

So here are a few suggestions which I think would help to make PWAs more accessible.

- Archive Format: make it possible to easily download, save and install an PWA at any time. That way I should also be able to see a version and the required permissions.

- Storage interface: In my opinion the browsers should offer some storage solution. For my last PWA I wrote a lib which could use different storage locations like a REST API or a WebDAV. It works really well, but it is a pain to enter your credentials every time you want to use a new app. Therefore, your browser should offer something similar to a webdav service to save data locally and let you configure a WebDAV service location if you want to store you data somewhere else (e.g. Nextcloud, DropBox, etc.).

- Improve native integration. Yes that is no easy part. I mean we already have a bunch of native integrations, like e.g. the Notifcation API, but to be honest I think they could be better. One thing many Apps probably would like to have, are systemtray icons. Actually, I never used electron so far (only cordova), but I expect them to have a bunch of plugins which could be a great ressource for the browser devs to find out what we need here.

As permissions are already built into the browsers I haven't mentioned them here, but with the rise of the Serviceworkers they are more important than ever. Users should be aware of the permissions they grant a software from some brief encounter in the web.

You can make a virtual file system in the browser using localStorage. You can then sync it across devices and browsers via a server.

You can upload files to the PWA using drag-n-drop or file input. You can also send files from the PWA to the device file system.

I think it's important that Web browsers can't automatically control the device hard drives, imagine if all web sites you visited would be able to do rm / -rf or scan all files on your hard drive.

Yeah, sure complete access to all files is rediculous. I think more of something like: By default every app has its own directory and the user can (easily) grant an app access to additional directories.

That way it can't do much damage and when you trust it, you can give it more access.

I use the localStorage as a cache for some of the offline capabilites but as a persistent storage it sucks as you can't easily open the stored "files" with other programms or PWAs.

The private directories is the way Android does it. It is a good idea, provided you can easily allow access to other directories (as you suggested). Unfortunately they missed that second point.

> who needs the low level functionality will end up with a native app

All please note. Electron is not a native app. It is a horrible hack that everybody use because it is easy.

Hybrid apps will always suck! ~ <3 hobbyist hybrid gamedev with client side js crypto mining on his mind }:‑)

> All please note. Electron is not a native app.

Electron is an extremely heavyweight native app frsmework, not a native app, but Electron apps are (bloated, sure) native apps.

Native means it uses the os rendering engine and widgets. Electron is not that. I don't know when web devs decided they could put a website in a box and call it native, but it's not very nice.

By that logic, GTK/Qt, basically any cross platform GUI library etc. is not 'native'.

There is virtually no iOS support though. Even though service worker and app manifest are being worked on at the moment in Webkit I think it'll be a while before we see safari/mobile safari updated. I completely agree PWAs are the way forward though.

There is actually "negative" support in iOS.

You can add a website to your homescreen in safari, but when you do it uses a different rendering engine, with different levels of support.

Take WebRTC which was recently (partially) added to iOS. It will work great in safari, but if you add the site to your homescreen, it is no longer supported.

The job of telling users to remove homescreen shortcuts to use a new feature is a nightmare.

Can’t you automatically detect this problem and tell the users when they try to do this?

Yes, but people become untrustworthy very quickly.

It doesn't make any sense to them, so they distrust it. Especially because we had been encouraging the act of bookmarking our web app on the homescreen for years (since it works great for our use case! Offline access is possible, loads quickly, no worries of apple shutting us down, and it's as cross platform as it gets). Also the wording is difficult. Telling users to open this same page, but in safari is confusing, and they need to login again, and navigate to that page again.

Imagine if a website told you that if you had previously "bookmarked" their page in your desktop browser, that you had to remove the bookmark to use a feature. You'd be skeptical at the very least right? It's a strange request...

Not to mention that even detecting it is kind of broken. The feature looks like it's available (opposed to pre ios 11 where the functions didn't exist), but when you go to use them they throw a generic exception (which can mean anything from they are in the "added to homescreen" browser on ios, the camera randomly crashed on android, another app is currently using the camera, or it just didn't work for some unknown reason).

So we have to check for the nonstandard `navigator.standalone` property, then just assume it won't work for the user. If iOS 12 adds support for this, we will need to update our app again and remove this block, but only if they are on iOS 12...

It's just a giant fucking mess.

You could check if one of the features that is only available on the home screen is available

That's kind of what I do when checking the `navigator.standalone` property, but it means I'm basically doing useragent sniffing by a different name, since if they fix this in iOS 12 I'll need to update my app so they can use it.

Wow, thats a bummer. Didn't know about that.

Anybody knows why Apple is doing that?

I've heard a few different things.

The cynical part of me wants to think that it's because by hurting it in WebViews and in a desktop-shortcut they can "support" these technologies without fear of them cutting into their app store sales/numbers.

But I have heard that there are some shitty technical problems with it.

Safari is not the same as a WebView when it comes to the code, and apparently a desktop-shortcut app runs in a WkWebView. So while they were able to add these features to Safari, the process of adding them to a WebView is much harder since it's intertwined with the OS so heavily.

According to someone I talked to a while back, WebViews and Safari in iOS are different enough that sharing code isn't exactly easy or straightforward.

But then the cynical part of me kicks back in and thinks that they shouldn't be following into the footsteps of Internet Explorer which hit the same traps and potholes (the integration with the OS meant new feature were extremely difficult to add, and the browser lagged behind because of it).

This is news to me. I thought WkWebview used the same internals as mobile safari. So it's just the JS engine/Nitro that's the same?

I'm not even sure what is the same and what is different, and there isn't anywhere that I found that explains it easily (if it can even be explained easily).

I think the difference might just be in the rendering engine. So Safari uses "safari", and WkWebView uses straight WebKit? But even that isn't true since there are things that WkWebViews support that WebKit doesn't...

But there are many differences between them. The WebRTC stuff above as one, but also things like appcache manifest stuff didn't work in WkWebView in iOS 9 (even though it worked in Safari). And that violation was especially egregious because it could be enabled by calling a single private Objective-C method like this

     [_wkWebView.configuration.preferences _setOfflineApplicationCacheIsEnabled:YES];

However apple would then deny your app in the app store if you did that...

So I genuinely don't know what to think.

Oh, and SFSafariViewController won't even save you, as that doesn't support WebRTC either...

Well that sucks. Thanks a lot for the info.

No problem, hopefully you don't get caught with your pants down like I did.

I forgot to actually test that a proof-of-concept of a new feature using WebRTC in a WebView until it was already like 70% done. I heard it worked in iOS 11, I tried it in safari and developed it like that, then once I started more in depth testing and integration I saw the problem.

So now I make sure I test everything in a WebView (if needed), as an "added to homescreen" web app, and as a safari tab ASAP.

That's Apple's problem though and they've been lagging behind for quite some time.

On Android it's possible for example to run Facebook as a web app, because Chrome on Android can deliver notifications, keeping that connection persistent, so even after the page has been closed.

And this is pretty cool because the browser is a much better sandbox than the OS. Now I use an iPhone and I'm very uncomfortable giving access to my photos to Facebook just for uploading a file.

They are not lagging, they are obstructing. Google wants to push users to the web because they control search. Apple wants to push people to their proprietary app store. They have consistently obstructed anything that brings native app features to the browser.


Every time browsers get new features people (ESPECIALLY ad networks) abuse it for tracking and other nefarious purposes.

Battery level, light level, probably even gyroscope stuff. Hell they fingerprint canvas which isn’t even an iOS thing.

I don’t want these issues. I LIKE these restrictions so random sites I visit (and even worse random code injected in them) can’t watch me as easy.

Apps have issues but I control what apps I download and can delete them. At least I have a _chance_ there.

Wait, what?

That's not an argument. Desktop browsers have features and add-ons for the privacy conscious right now. You can block trackers, third party cookies, JavaScript execution and anything you need. Personally I feel much, much safer loading a website than when executing a binary on my computer or phone.

You can block any elements on any website from loading, but you can't inspect application binaries and block specific elements from it — only requests to certain IPs or domains, if you had root access that is.

Can you block Facebook's in-app advertising on your iPhone? You can't and even more so, the app insists on opening all URLs in its own dumbed down view instead of Safari, which means they track those visits and their duration as well, probably without content blocking active, because AFAIK it doesn't work in web views.

Well I can block Facebook's ads and tracking in my Firefox for Android, since it supports extensions and it probably works using iOS Safari's content blockers as well.

Apps that show image ads don’t get to execute random people’s JS on my phone.

(I avoid the vast majority of ad laden apps anyway, partlybfor tracking reasons).

This is a strange argument.

The website operator/publisher is the one choosing to track you (or not). Not some magic third party.

If you don't trust example.com from tracking you, you certainly cannot trust example.App from tracking you.

For web, the technology is at least transparant and you can detect being tracked. With native apps, there is nothing you can do, other than reverse engineering the binaries, monitoring internet-traffic and hoping that example.App was built with privacy in mind.

I trust example.com. The problem is they include Google ads which can do anything to track me the browser allows.

If I download the example.com app then any tracking is limited to what they included either themselves or through an SDK. I know that $random_advertiser doesn’t get to execute their own code.

> I trust example.com. The problem is they include Google ads which can do anything to track me the browser allows.

You either trust them, or you don't. If you don't trust the ad-networks they embed in their site then you don't trust them.

> If I download the example.com app then any tracking is limited to what they included either themselves or through an SDK.

You either trust them, or you don't. If you decide you trust the ad-networks they embed in their site then you can trust them.

Both are no different. Other than that you can evaluate the first quite easily but not the latter.

My point is that it is silly to trust someone from including advertising and tracking on one platform (binary-app) but not when they do the exact same on another (html-app).

This. I work on the mobile web, and eagerly watch the webkit updates, but it's clear that Apple wants users to download native apps, b/c they control the quality and security of apps coming out of the App Store.

It's your problem if a third of your potential users gets put off by how sub-standard your PWA is on their platform and chooses a competitor with native mobile app instead.

Most Chrome Apps can be rewritten as PWAs. But IMO not all Electron apps can be written as PWA. Specially those, who need access to filesystem and other system APIs that are not allowed in the browser.

Build your first Progressive Web App courtesy of the big G: https://developers.google.com/web/fundamentals/codelabs/your...

I wonder if Rails support could be added for PWAs? I found a guide here: https://rossta.net/blog/make-your-rails-app-a-progressive-we... but I'm only midway through testing it. Getting Puma (Rails dev web server) to speak SSL without throwing errors is a stumbling block :/

Do you know whether PWAs can access the local file system (which is a basic requirement for a particular Chrome app I use heavily)?

Yes. In chrome only:


It gives JavaScript access to its very own, empty, sand-boxed VFS. However, you can give the page access to directories manually with drag-n-drop or a directory selecting input tag. So if the app needs access to just one parent directory then you're good to go. If you need the app to have indiscriminate access to the entire filesystem then you might be able to give it C:/ (or whatever other root dir) but I have never actually tried it.

Given Google’s shift to focussing on standard and standards track web platform features in Chrome, and tendency to eliminate everything else, I wouldn't bet on this (which predates that strong focus) being around forever.

Applications are open for YC Winter 2022

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact