[HN Gopher] Notepad Tab
       ___________________________________________________________________
        
       Notepad Tab
        
       Author : gamekingro
       Score  : 33 points
       Date   : 2024-05-27 21:15 UTC (1 hours ago)
        
 (HTM) web link (notepadtab.com)
 (TXT) w3m dump (notepadtab.com)
        
       | behnamoh wrote:
       | From the website:                   "Doesn't use analytics =
       | respects your privacy"
       | 
       | Meanwhile, Brave stopped this tracker:                   https://
       | static.cloudflareinsights.com/beacon.min.js/vef91dfe02fce4ee0ad05
       | 3f6de4f175db1715022073587
        
         | Dalewyn wrote:
         | On a similar token:
         | 
         | >Doesn't use a server = no downtimes
         | 
         | Except there is a server, whatever and wherever it is behind
         | notepadtab.com.
        
           | jimbobthrowawy wrote:
           | Is there anything in the HTML spec that tells browsers to
           | always show a cached version a page if it can't be loaded the
           | next time you try to access it?
           | 
           | I think PWAs might have something like that, but haven't
           | tested it in a normal browser or tried building one.
        
             | Dalewyn wrote:
             | HTML dictates how webpages should be structured and then
             | rendered.
             | 
             | You're probably asking about HTTPS, in which case: No. The
             | first rule about HTTPS is no caching, because you want to
             | validate that what you see is from the server and you can't
             | prove that with a cache.
        
             | dntbrsnbl wrote:
             | Yeah, you can do something like that with a ServiceWorker -
             | it does require some JavaScript though.
             | 
             | https://developer.mozilla.org/en-
             | US/docs/Web/Progressive_web...
        
             | etaioinshrdlu wrote:
             | Maybe the entire page could be a self-updating data-url?
             | 
             | edit: I tried this and common browser security no longer
             | allows this type of thing. 10 years ago it may have worked.
        
               | greyface- wrote:
               | Here:                 data:text/html,<body
               | contenteditable oninput="history.replaceState(0,0,'%23'+b
               | toa(document.body.innerHTML))" onload="if(location.hash)d
               | ocument.body.innerHTML=atob(location.hash.substring(1))">
               | #SGVsbG8sIHdvcmxkIQ==
        
               | TimTheTinker wrote:
               | Beautiful. Beat me to it.
               | 
               | Much better than a relying on an HTTP response from
               | someone else's computer.
               | 
               | This got me thinking... someone should build an in-
               | browser locally hosted library of apps for use cases like
               | this. Essentially, apps that are something between
               | bookmarklets and Electron apps. I say "in-browser" to
               | avoid security pitfalls (e.g. npm supply chain attacks).
        
         | derefr wrote:
         | While you might assume that Cloudflare "insights" is an
         | advertising/analytics system, this is actually part of
         | Cloudflare's anti-DDoS infrastructure. This "beacon" gets
         | injected at random on Cloudflare-served HTML pages, to track
         | you throughout your use of all Cloudflare-proxied sites, as an
         | alternative to an evercookie in building a long-term reputation
         | profile of "human browsing" for your browser.
         | 
         | This reputation profile is then used as part of the heuristic
         | behind CloudFlare Turnstile's "Are you human?" checkbox.
         | 
         | This is why browsers that have NoScript enabled by default for
         | all sites (e.g. Tor Browser), cause Cloudflare-proxied sites to
         | throw endless security interstitials and never let you through,
         | even when you disable NoScript for the protected website.
         | Without reputation-profile data gathered from other sites,
         | Cloudflare just sees a fresh browser profile making its first
         | connection ever to some obscure site that nobody would ever
         | _actually_ visit as the first thing they do on a new computer.
         | And so it thinks your browser is a (not-very-clever) bot.
         | 
         | I don't think it's possible for a site owner to opt out of this
         | reputation-profile data gathering, while still relying on
         | Cloudflare's DDoS protection.
         | 
         | However, I also don't _believe_ that the data Cloudflare
         | gathers via this route is sold to third parties. (Someone
         | please correct me if that 's wrong.)
        
           | madeofpalk wrote:
           | Builds a persistent profile of you across the web... this is
           | directly at odds with "Doesn't use analytics = respects your
           | privacy"
           | 
           | I'm sure the author isn't aware of it and it's just an
           | oversight, but still.
           | 
           | Why does a single static html file even need a CDN?
        
       | gurjeet wrote:
       | Neat idea. But it pollutes the browser history with every
       | keystroke.
        
         | geor9e wrote:
         | It doesn't for me. Looks like they're just changing the html
         | anchor (# ...) with a location.replace which isn't a redirect
         | so shouldn't spam history.
        
       | timsneath wrote:
       | Nice idea. But looks like this is unreliable, with some
       | indeterminate cut-off point after which it stops working. I
       | created 100 paragraphs of Lorem ipsum which I pasted into the
       | textbox. It didn't show any error, but when I pasted the URL into
       | a different window, the textbox just shows 'undefined'.
        
       | jayski wrote:
       | This is basically encoding(base64?) the <textarea> and putting it
       | in the URL.
       | 
       | Its a neat idea, but I think theres a limit to how long URLs can
       | be.
        
         | sanchez_0_lam wrote:
         | Ouch, that's bad :D Won't store too long texts.
        
           | baliex wrote:
           | It is at least compressed to make the most of the limit
        
             | jsheard wrote:
             | Seems you can push it pretty far, I pasted in the entire
             | John Galt speech (183,742 characters) for a laugh and
             | Chrome had no issue with the length of the resulting URL.
             | Though the URL is still 83,638 characters long so people
             | would probably object to you pasting it into the group chat
             | for more reasons besides it being the John Galt speech.
        
         | JTyQZSnP3cQGa8B wrote:
         | IIRC in theory it's 2048 characters, but in practice it's 2000
         | (at least in Chrome a few years ago when I toyed with Google
         | Maps for food).
        
           | hobs wrote:
           | It's actually much longer, I was implementing a javascript
           | bookmarklet and the old published limitations are not
           | respected by much anymore, so you can shove a LOT of data in
           | there.
        
       | sanchez_0_lam wrote:
       | Any thoughts how this works under the hood? Like @gurjeet said,
       | every keystroke is a new url. But then how all this is stored?
       | Will it scale? :D
        
         | skulk wrote:
         | It's stored in your history stack. I spent 15 seconds pressing
         | the back button slowly becoming more and more horrified as I
         | watched my characters disappear one by one.
         | 
         | You can see how it works for yourself by opening your browser
         | devtools, opening the JS console, and typing
         | window.location.hash = "test"
         | 
         | You should see a "#test" pop up at the end of your URL.
         | Pressing back will not change the page, but will make that go
         | away.
        
       | geor9e wrote:
       | I made a very similar notepad tab. Only me and my girlfriend use
       | it (since I don't market it or anything) but we've been using it
       | constantly every day for about a year. I'm surprised it's not a
       | default function of browsers to be honest - new tabs are such
       | wasted space. Basically, every tab is the same document, it saves
       | to the browser's cache locally so you don't lose anything when
       | you close the browser. https://github.com/gth001/George-s-Notes-
       | Tab-Extension
        
       | nabaraz wrote:
       | Neat concept but pollutes the browser history and maximum length
       | of 2048 characters defeats the purpose.
       | 
       | Can we use svg instead?
        
       | codazoda wrote:
       | I created Ponder, which does something similar. Mine was inspired
       | by the Alpha Smart, so it has 10 "files" and it saves to local
       | storage, so it might not be loss proof, but I use it as a scratch
       | pad and it works quite well.
       | 
       | https://github.com/codazoda/ponder
        
       | sergiotapia wrote:
       | it pollutes the back button
        
       | PowerfulWizard wrote:
       | Here's what I use (as a bookmark):
       | data:text/html,<body contenteditable style="line-height:1.5;font-
       | size:20px;">
       | 
       | No save function obviously but this lets me open a new tab and
       | dump some text.
        
         | wesamco wrote:
         | Nice! I bookmarked it and I'm gonna start using it, thank you.
         | 
         | For a quick and dirty save, you can press Ctrl+P to open the
         | print window/dialog and select "Save as PDF", or you can press
         | Ctrl+S and save as a single HTML file.
        
       | zX41ZdbW wrote:
       | I did almost the same project, but better, two years ago:
       | https://pastila.nl/
       | 
       | https://github.com/ClickHouse/pastila
        
         | zX41ZdbW wrote:
         | It's better because it minimizes the UI. You get the same
         | experience as in the text editor, such as Notepad or Kate, with
         | no fluff.
        
       | rpastuszak wrote:
       | Hehe, that's one of the reasons I made write.sonnet.io a few
       | years back. It's a never-ending strip of paper/stream of
       | consciousness.
        
       | chongli wrote:
       | Cool concept but I would never use it. It's an archetypal example
       | of the web being the champion of "worse is better." I am happy
       | with just taking notes in a local text file using a text editor.
       | This is not a complicated problem to solve.
       | 
       | Save notes by copying and pasting the URL? Why not just copy and
       | paste the text itself? I don't need formatting in my notes.
        
       ___________________________________________________________________
       (page generated 2024-05-27 23:00 UTC)