←back to thread

578 points smusamashah | 1 comments | | HN request time: 0s | source
Show context
egeozcan ◴[] No.42463511[source]
This is very cool. BTW, when developing single HTML file apps, instead of localStorage, one can use the HTML as the source of truth, so the user can just save/save-as to persist. I had mentioned my quick and dirty attempt at an image gallery that is a self-contained html file and some really liked the concept, if not the "app" itself: https://news.ycombinator.com/item?id=41877482
replies(6): >>42463631 #>>42464347 #>>42467577 #>>42471918 #>>42476577 #>>42477123 #
smusamashah ◴[] No.42467577[source]
Does using save as retain changes you make in the HTML (like aedits on a contenteditable element)? In my experience it does not. When you save, the originally loaded html will be saved, any changes in html stay in your browser.
replies(1): >>42468656 #
egeozcan ◴[] No.42468656[source]
My bad, I should have mentioned that you should choose the option to save the complete web page. It becomes default on Firefox once you select it. Not sure about Chrome and others.

It looks like this on Firefox, Windows: https://imgur.com/zNlEGgK

replies(1): >>42470583 #
rollcat ◴[] No.42470583[source]
Great idea, as usual killed in its infancy by lacking UA UX. We even already have an API to ask the user not to close the web page, because there's unsaved work; but it wouldn't work with "Save as...", because you can't detect that, and the browser won't do it for you, even if it knows you're editing a local file.

Same for all of the pointless cookie banners - they could've been UA prompts instead, putting the user in charge of setting a policy ("always trust example.com", "never trust example.net", "accept example.org for this session", etc). But building such prompts into a browser would've been a nuisance in 1997... So we ended up with that nuisance anyway, just enshrined by shortsighted laws, that target each and every website - rather than the three remaining browser engine vendors.

replies(2): >>42471994 #>>42479089 #
tomcam ◴[] No.42479089[source]
What is UA UX?
replies(1): >>42479210 #
rollcat ◴[] No.42479210[source]
UA = User Agent (in this case, web browser). UX = user experience (catch-all term for "design", "how it works", integration, etc).
replies(1): >>42482141 #
1. tomcam ◴[] No.42482141[source]
Was not hip to the UA part so couldn’t directly connect with the UX part, thanks