URLFormJS
pastml
URLFormJS | pastml | |
---|---|---|
4 | 1 | |
21 | - | |
- | - | |
5.9 | - | |
10 months ago | - | |
JavaScript | ||
BSD 3-clause "New" or "Revised" License | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
URLFormJS
-
Show HN: Non.io, a Reddit-like platform Ive been working on for the last 4 years
I'm concerned about the `#` character in the URL.
# means fragment and that's kept local and not sent to the server unless client side Javascript sends it to the server. I would use an identifier that doesn't already mean something to the URL.
See https://github.com/Cyphrme/URLFormJS#query-parameters-fragme... (Also see https://github.com/Cyphrme/Path)
For an example where this is relevant: https://cyphr.me/ed25519_tool/ed.html#?msg_encoding=Text&msg...
And see https://www.rfc-editor.org/rfc/rfc3986#section-3.5
- URLFormJS: Create sticky forms, stateful applications, shareable links
-
How to store your app's entire state in the url
I wrote a library for storing application state in the URL. Its novel feature is using fragment query, which prevents the information from being sent to the server.
https://github.com/Cyphrme/URLFormJS
I would love to see it get more use.
Here's a small demo: https://cyphrme.github.io/URLFormJS/#?first_name=Bob&last_na...
See my other comment on this page for some other examples of its use.
pastml
-
How to store your app's entire state in the url
I imagine I'm not the first one to think of this, but a little while back I wrote a toy pastebin-like webpage that stored the code being rendered directly in the URL (with base64 and gzip compression to make it a bit smaller, although it still was quite large by usual standards). My thinking was that rather than having a centralized app for this publicly available, making a small page that could be statically hosted would make it easy for people or organizations to host their own page with whatever security they need (e.g. behind a firewall or VPN) and then the links could be shared privately on Slack or whatever without a need to add functionality for determining who should have access or how long to keep the code snippet around and instead just piggyback off of the privacy of whatever channel/DM they sent it across and how long the Slack instance is configured to retain history.
When I first came up with this idea, I was going to write some sort of server backend rather than just doing everything in the frontend, but once I started actually working on it, I realized that it wouldn't really add any value and it would make it a bit more annoying for people to self-host. Since then, I've wondered a bit how viable "static pages with state in the URL that can be easily self-hosted" would be as an alternative to a desktop GUI or Electron app for more technical users. One of the nicest parts of this approach to me is that I was able to make in only a few hours one evening despite knowing only the basics of webdev from maybe 8-10 years ago and next to nothing about programming GUIs in general. This makes me think that it wouldn't be too hard for people to fork and modify it to their own liking (e.g. changing the hard-coded style settings for rendering the code snippets), so there could be potential for an ecosystem to grow organically around something like this.
In case anyone is curious to take a look: https://gitlab.com/saghm/pastml/
What are some alternatives?
Path - A more robust URI naming scheme
CozeJS - Coze Javascript - cryptographic JSON messaging specification
calculang - calculang is a language for calculations 🧮💬👩💻
u - μ is a JavaScript library for encoding/decoding state (JavaScript object) in URL
nonio
sveltekit-search-params - The easiest way to read and WRITE from query parameters in sveltekit.
t
xstate - Actor-based state management & orchestration for complex app logic.
ipfs - IPFS implementation in JavaScript
brotli-wasm - A reliable compressor and decompressor for Brotli, supporting node & browsers via wasm