Web apps in a single, portable, self-updating, vanilla HTML file
151–160 of 240 posts
Re: Web apps in a single, portable, self-updating, vanilla HTML file
#152Earlier quoted context omitted.
How does this differ from htmx?
htmx requires a server. This enables a single html file to modify itself.
Re: Web apps in a single, portable, self-updating, vanilla HTML file
#153Earlier quoted context omitted.
A significant hindrance for generator-type apps is that only pages loaded via HTTPS have access to the clipboard API, so ”copy to clipboard” does not work via file:///. You can have a zero-build zero-dependency offline-only app which users could theoretically just save as a page, but copy buttons will not work, so you have to detect the API not being available and replace buttons with popover textareas. Clunky. As fo…
This is so weird that a random website on a random server (having SSL doesn’t change that in the slightest) is considered less of a risk than a file I have on my own computer. Can somebody help me understand what’s going on?
Re: Web apps in a single, portable, self-updating, vanilla HTML file
#154Re: Web apps in a single, portable, self-updating, vanilla HTML file
#155Earlier quoted context omitted.
A significant hindrance for generator-type apps is that only pages loaded via HTTPS have access to the clipboard API, so ”copy to clipboard” does not work via file:///. You can have a zero-build zero-dependency offline-only app which users could theoretically just save as a page, but copy buttons will not work, so you have to detect the API not being available and replace buttons with popover textareas. Clunky. As fo…
This is so weird that a random website on a random server (having SSL doesn’t change that in the slightest) is considered less of a risk than a file I have on my own computer. Can somebody help me understand what’s going on?
> In particular, the user agent SHOULD treat file URLs as potentially trustworthy.
> User agents which prioritize security over such niceties MAY choose to more strictly assign trust in a way which excludes file.
A potentially trustworthy URL is a secure context: https://html.spec.whatwg.org/multipage/webappapis.html#secur...
So this is a matter of browsers not implementing it, probably because there’s just not a lot of demand for it.
Re: Web apps in a single, portable, self-updating, vanilla HTML file
#156I would like web standards have better support for pages stored in a local file (opened using file:// protocol). Sometimes I write simple HTML/Vue based mini-apps for myself and every time something doesn't work and I need workarounds, for example: - local HTML file cannot import local JS modules, so I have to use legacy writing style - local HTML file cannot open other local files (for example, audio files) I unders…
Re: Web apps in a single, portable, self-updating, vanilla HTML file
#157For people who are confused: Hyperclay is a NodeJS server and frontend JS library that allows HTML pages to update their DOM and then replace their own .html source with the updated version. Imagine clicking a checkbox, which adds the `checked` attribute to its element, then using Hyperclay to globally persist this version of `document.body.outerHTML`, so that it's there next time someone visits the page. There's aut…
To be completely honest, I don't see how this is more useful than adding a sync layer to localStorage. I did make a service that does that at htmlsync.io and am genuinely curious how this solution is better.
Your notes are the HTML file! You can keep it in your documents folder, sync it via any service, track it in version control, etc. It’s for folks who know what the filesystem is, don’t know how to host a server (or don’t want to), but want a website-like experience. Works offline, too!
Re: Web apps in a single, portable, self-updating, vanilla HTML file
#158Re: Web apps in a single, portable, self-updating, vanilla HTML file
#159To take this concept one step further towards perfection, you would want to lose the backend completely and persist directly to a git repo using https://isomorphic-git.org/
But in my experience the potential audience shrinks significantly once anything git related is expected from a user.
Re: Web apps in a single, portable, self-updating, vanilla HTML file
#160To take this concept one step further towards perfection, you would want to lose the backend completely and persist directly to a git repo using https://isomorphic-git.org/