Hacker News new | ask | show | jobs
by ashwin110 1904 days ago
I wouldn't say web apps are always preferred over a native app. When people are prototyping, I see a lot of people building web apps to get the idea out. However, as you grow, a native app might be favourable if you can have one cause in my experience they perform better, especially in the background. You don't have to worry about what browser they're using and if it supports the things you need, as long as the OS supports it and you can do more stuff in the background like local notifications which web apps can't
1 comments

In the case of notification, we can do that with webapp as well.

Both Chrome and Firefox support that https://developer.mozilla.org/en-US/docs/Web/API/Push_API

> In comparison, Chrome applies no limit, but requires that every push message causes a notification to be displayed.

No silent push is a huge limitation. Can't let the server send you updates without annoying the user.

Actually its better, Chrome just displays a silent notification that says "this website just updated in background". I personally would rather know that a app did something behind my back. But I can see some users getting the wrong idea.

Though I think it ia fair since chrome is a web browser and shouldn't be making requests to random websites without my knowledge. cough cough

I can see your point of view, but lets say I made a weather site. Would you really want to be notified everytime the data is updated, or do you just want the latest data when you view the page (assuming you want it to do that; I would like up to date data when I view the page, without having to wait for it to refresh; but then, since I'm the developer of my hypothetical weather page, I trust myself not to do anything untoward with the data)
In that case, the website can just do a get request when I click on the app. That should take like <200ms and won't even be noticable imo. The notification is only there for the use of Push API.