4 ms·
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
by dmazzoni 3y ago
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
- rpastuszak 3y agoI'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%20CDN) https://sonnet.io/projects#:~:text=Laconic!%20(a%20Twitter%2...
- _lvbh 3y agoI use https://github.com/qntm/base2048 https://github.com/qntm/base2048
- rpastuszak 3y agoThis is amazing, thanks
- gvx 3y agoShameless self-promotion: https://github.com/gvx/base116676 https://github.com/gvx/base116676
- pcthrowaway 3y ago> 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
- account42 3y agoJust another reason why service workers were a mistake and should be removed.
- maxbond 3y agoYou can use this trick to get a handy notepad. data:text/html,<html contenteditable> I keep it on my bookmarks toolbar.
- petabytes 3y agoReminds me of what I did with ChromeOS in middle school, built a whole code editor in the URL bar.
- undebuggable 3y agoDuh, one can load preconfigured ACE editor with syntax highlighting with it.
- loueed 3y agoI 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.
- deleted 3y ago[deleted]
- undebuggable 3y ago(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_HTTP/Data_URLs#browser_compatibility https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_...