top | item 37568610

(no title)

mozey | 2 years ago

Instead of wrapping the application with something like Electron, why not install as a service and connect to a localhost port using your default browser?

I know this is not the same UX as installing an app. But why isn't this technique more standard?

Besides more efficient resource usage, another benefit is that it keeps the client/server architecture.

discuss

order

layer8|2 years ago

It’s more obscure for users if they have to open http://localhost:some_port/. You also have to decide on a hopefully free port.

As an aside, if the application isn’t careful, that approach can potentially open up a security hole, because external javascript on a web page in your browser can perform requests to localhost.

mozey|2 years ago

CORS policy usually requires that the port must match. This issue potentially applies to all web apps, not only those hosted on localhost

J_Shelby_J|2 years ago

Hrmmm I wonder if you could do this on mobile.

mozey|2 years ago

Last time I checked it's not possible on iOS. On Android it's possible with some effort (e.g. you have to use Termux), not something you could expect a user to setup