4 ms·
I would like browsers to offer a true "local app mode": Locally installed code (HTML/JS) that would be run using the browser runtime, but with enhanced privileg
by tgsovlerkhgsel 2y ago
I would like browsers to offer a true "local app mode": Locally installed code (HTML/JS) that would be run using the browser runtime, but with enhanced privileges behind a permission model (e.g. the possibility to grant filesystem access etc.).
Currently, developers that need a single thing they can't get from within a browser are generally forced to create an Electron app, which means they essentially bundle an outdated (and often never updated) version of a browser with their app. It would be much better if you could just use the already installed, always updated browser as the runtime for your "local" app.
That would also create an incentive to develop in the browser ecosystem, and possibly move to a PWA - or at least it would show why devs prefer "real" applications to PWAs.
- wkirby 2y agoGenuine question: is this not exactly what the Tauri project aims to do?
- cranberryturkey 2y agoAnd primatejs just released desktop support
- tgsovlerkhgsel 2y agoLooks like it's very close to what I meant! I was thinking of something like `/usr/bin/firefox --webapp-mode /var/opt/path/to/approot/` (in my model, the browser would contain code to load some standard webapp format, while with Tauri it looks like the app bundles a small piece of code that loads local webkit) but that's just a detail. The downside of Tauri is that you likely run the built-in runtime with regular (full) access, while with a browser-controlled flow, the browser could enforce a permission system.
- plonq 2y agoFWIW Tauri has a comprehensive permission system
- LoganDark 2y agoI think the concern is not XSS but rather trusting the first party developer of the binary that hosts the webview.
- nox101 2y agohow is that different than apps off an app store?
- LoganDark 2y agoOn platforms that have app stores (including desktop operating systems like Windows, some distributions of Linux, and especially macOS), the apps you download from the store are sandboxed (UWP; Flatpak/AppImage; Apple) far more than raw binaries. Tauri apps are raw binaries; Electron apps are too; those are both different from visiting a webpage in a browser, regardless of whether such navigation happened manually or automatically (as in from a PWA shortcut).
- DaiPlusPlus 2y agoIt's what Microsoft did with "HTA" back in the mid-1990s; this is nothing new. ...and we'll see a repeat of the problems it caused Microsoft back then trying to improve Windows and Internet Explorer over time while still maintaining backwards-compatibility with a surprisingly large number of already-distributed HTAs (HTAs were popular for things like magazine CD demo-disk catalogs, computer hardware driver splash-screen GUIs, kiosk apps, that kind of thing - by 1998 if you didn't care about Netscape support you could take full-advantage of Trident (MSHTML)'s hacked-on support for parts of DirectX graphics (gradients, alpha-transparency, smooth animations) - the only alternative was VB5/VB6 and I think/hope it was obvious to everyone at the time that VB's days were numbered; and don't forget that Macromedia put decent effort into making Flash work well for standalone "Flash Projectors" - and you could embed SWFs in your HTA too; so this incredibly capatable HTML+CSS or HTML+Flash-based "interactive experiences" were expected to quickly become the standard for desktop multimedia. ...well, they didn't: instead .NET's WinForms (a marginal improvement over VB6) is still dominant for Windows fixed-size-window RAD GUIs, while HTAs started to suffer decline when XP shipped in 2001 because of the breaking-changes between IE4, IE5, and IE6 (hence even more hacks like Conditional Comments) - and security-folk sensibly reminded us that it was not a good idea for magazines/trade-shows/etc to distribute CD-ROM discs with autorun HTAs containing embedded ActiveX controls running under full-trust on every Windows machine from 95 to XP. Mozilla of 2024 needs to avoid repeating Microsoft's self-inflicted issues. ----- As for me? For now, I'd really rather just have a fork of the Blink layout engine that can run off XML and CSS and would be driven by something like a COM interface to the DOM - which means Blink doesn't need to bring its own JavaScript engine, which makes the system more secure - and means they'll finally be able to have a Blink-based page render that doesn't require 4 separate isolated processes consuming gigabytes of RAM (looking at you, GitKraken).
- flomo 2y agoYep, Internet Explorer had this 'security zone' feature which privileged localhost/file urls, except it was too easy to confuse it about what 'zone' it was running in, leading to endless security bugs. Probably the worst feature of the browser.
- tech234a 2y agoSee Chrome’s Isolated Web Apps spec that they’re starting to launch: https://chromestatus.com/feature/5146307550248960 https://chromestatus.com/feature/5146307550248960
- deafpolygon 2y agoWell, I'd like that but not from Google.
- Ajedi32 2y agoOh wow, they're finally doing it! I've been waiting for this[1] since Web Bundles became a thing, but after 6+ years I was starting to get the impression it wasn't going to happen. I guess I haven't been following it super closely. [1]: https://news.ycombinator.com/item?id=17778489 https://news.ycombinator.com/item?id=17778489
- treyd 2y agoThis is still so many steps to recreate what Flatpak / mobile app models / etc are already close to, but with less freedom for developers by still being restricted to the web stack.
- idle_zealot 2y agoThe big difference is that these apps would be cross-platform, where all of your listed solutions only run on one platform.
- rtpg 2y agoBut it would have the advantage of working in a proven model, whereas flatpaks are notorious for causing breakage for so much that uses it. I am OK with flatpaks in theory, but there are years-old bugs with flatpak permissions that simply aren't getting resolved. Something is off with the feedback loop.
- efilife 2y agoThere is many? :-)
- deleted 2y ago[deleted]
- pjmlp 2y agoBasically Active Desktop applications from Windows 98, Symbian Web Runtime, or WinJS apps on Windows 8, no thanks. I used to like them as much as I like Electron apps.
- spankalee 2y agoHow is that not just PWAs?
- ffsm8 2y ago> grant filesystem access That actually already exists nowadays https://developer.mozilla.org/en-US/docs/Web/API/File_System_API https://developer.mozilla.org/en-US/docs/Web/API/File_System...
- M95D 2y ago> It would be much better if you could just use the already installed, always updated browser as the runtime for your "local" app. So that an update, automatic if at all possible, can break all the apps at the same time.