←back to thread

578 points smusamashah | 2 comments | | HN request time: 0.001s | source
Show context
johnfn ◴[] No.42463936[source]
I think "single HTML file" sets up a certain expectation that a five-thousand-line long HTML file with ~3500 lines of embedded JS doesn't really live up to. I mean, hey, everything can be a single HTML file if you embed the bundle inline in your HTML!

Cool project, though - don't mean to take away anything from it.

replies(14): >>42464100 #>>42464173 #>>42464210 #>>42464396 #>>42464481 #>>42464520 #>>42464775 #>>42465102 #>>42466230 #>>42466423 #>>42466472 #>>42467609 #>>42472114 #>>42474653 #
rpdillon ◴[] No.42464173[source]
I totally understand your take, but as a guy that spends most of his time on side projects working on single HTML files, I have a different perspective.

I find the totally self-contained nature of them very appealing because it travels well through space and time, and it's incredibly accessible, both online and offline.

My current side project is actually using a WebDAV server to host a wide variety of different single HTML file apps that you can carry around on a USB drive or host on the web. The main trick to these apps is the same trick that TiddlyWiki uses, which is to construct a file in such a way that it can create an updated copy of itself and save it back to the server.

I'm attracted to this approach because it's a way to use relatively modern technologies in a way that is independent from giant corporations that want to hoover up all my data, while also being easy to hack and modify to suit my needs on a day-to-day basis.

replies(8): >>42464261 #>>42464741 #>>42465036 #>>42465064 #>>42466172 #>>42468502 #>>42468962 #>>42470850 #
dogtierstatus ◴[] No.42470850[source]
> construct a file in such a way that it can create an updated copy of itself and save it back to the server

Is there some way to accomplish this through GitHub? Like the single html file running on GitHub.io pages can commit the changes to its repo?

replies(1): >>42473957 #
1. wizzwizz4 ◴[] No.42473957[source]
You should be able to use the Smart HTTP protocol with HTTP Basic Auth (https://git-scm.com/docs/http-protocol) to push a locally-created commit. Forgejo supports CORS here, but I don't know whether GitHub does.
replies(1): >>42475274 #
2. mdaniel ◴[] No.42475274[source]
Both GitHub and GitLab have killed http basic auth https://docs.github.com/en/rest/authentication/authenticatin... https://docs.gitlab.com/ee/topics/git/troubleshooting_git.ht...

That's not to say one couldn't still do what you're describing via other headers, I'm just saying "<input name=username><input name=password>" won't get it done