Hacker News new | past | comments | ask | show | jobs | submit login

Just in case anyone doesn't already know, you can do that with a data uri as well:

data:text/html,<h1>My%20small%20website</h1><p>Look,%20it's%20real!</p>

You can use a data uri generator to base64-encode it, if you want.

Advantages of smolsite:

- Zip might let you fit a bit more than a data uri

- Some JS APIs would work on a smolsite url, but wouldn't work in a data uri




You can use this trick to get a handy notepad.

    data:text/html,<html contenteditable>
I keep it on my bookmarks toolbar.


I also have a bookmarklet for quick notes.

> data:text/html,<html contenteditable><body style="margin: 10vh auto; max-width: 720px; font-family: system-ui"><h1>New Note

I added some basic styles so I can screenshare :D

Also in most browsers, CTRL + B, I and U work in contenteditable divs.


Reminds me of what I did with ChromeOS in middle school, built a whole code editor in the URL bar.


Duh, one can load preconfigured ACE editor with syntax highlighting with it.


> Some JS APIs would work on a smolsite url, but wouldn't work in a data uri

In before someone writes a smolsite to install a service worker on the domain that sends analytics for all other smolsites to their own server


Just another reason why service workers were a mistake and should be removed.


I'm using Base64 + gzip (IIRC) which allows me to store ca 5kb of text in a single Tweet: https://sonnet.io/projects#:~:text=Laconic!%20(a%20Twitter%2...



This is amazing, thanks


Shameless self-promotion: https://github.com/gvx/base116676


(Un)fortunately web browsers [1] and URL shorteners block opening and redirecting to data URLs so they are useful mostly as bookmarks in the web browser.

[1] https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_...




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: