Readit News logoReadit News
Posted by u/acidx 2 years ago
Show HN: Host a Website in the URLsmolsite.zip/UEsDBBQAAgAI...
I wrote this silly thing a couple of weeks ago. It's absolutely useless but it's a fun tech demo for my web server library. Enjoy!
Lerc · 2 years ago
selcuka · 2 years ago
Neat. You can then let TinyURL host your web site:

https://tinyurl.com/dmk9e4m2

Zuiii · 2 years ago
Congratulations, you've turned tinyurl into a free web hosting service.
6th · 2 years ago
I love the way the smoke seems to be coming off the top of it.

Just a second. I'm late for golf!

louthy · 2 years ago
If it gets out of hand, make sure you know the new number for the security services:

0118999881999119725 ...3

And yes, I have that memorised!

seanthemon · 2 years ago
Of course! Made in Britain
pluijzer · 2 years ago
I made a QR code from this link. It really isn't anything crazy. Isn't that cool, we can host websites from QR codes!
yonatan8070 · 2 years ago
Hosting a website without a computer is quite cool if you ask me
prox · 2 years ago
Wow, this is just crazy cool. I can imagine this growing into a thing.
7ewis · 2 years ago
I was fully expecting to see Rick Astley!
SLWW · 2 years ago
and now my Thinkpad is rethinking it's lack of resources.
acidx · 2 years ago
I love this!

Deleted Comment

dmazzoni · 2 years 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

maxbond · 2 years ago
You can use this trick to get a handy notepad.

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

loueed · 2 years ago
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.

petabytes · 2 years ago
Reminds me of what I did with ChromeOS in middle school, built a whole code editor in the URL bar.
undebuggable · 2 years ago
Duh, one can load preconfigured ACE editor with syntax highlighting with it.
pcthrowaway · 2 years 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 · 2 years ago
Just another reason why service workers were a mistake and should be removed.
rpastuszak · 2 years ago
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...
acheong08 · 2 years ago
undebuggable · 2 years 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_...

geonnave · 2 years ago
On the subject of weird stuff on a URL, here is a prime dog: https://geonnave.github.io/primg/#17976931348623159077293051...
teacpde · 2 years ago
This one is amazing, even just the fact that someone thought about representing images with binary format of prime number
userbinator · 2 years ago
SushiHippie · 2 years ago
Nice, reminds me of nopaste [0], which is a pastebin that stores the text in the url compressed with lzma and encoded with base64.

[0] https://nopaste.boris.sh/

dspillett · 2 years ago
That will send the content to the server for unpacking. A slightly more convoluted option might be to put the zip in the anchor part instead and have the response serve code to unpack it from there client side. Though now the server can't scan for damaging content being sent via it, even if it wanted to, as the anchor part does not get sent to the server.
cnity · 2 years ago
I thought the same thing (though you could do it without anchors as long as the static content server used a glob for routing all traffic to the same web page). It would really simplify hosting.
debarshri · 2 years ago
this is really cool and I think it feel like how show HN should be instead of marketing ploy for other orgs pushing their product.
hsbauauvhabzb · 2 years ago
I love this type of stuff too, but be aware ycombinator is a start up incubator - people showing off there wares is presumably encouraged, up to a point.
yellow_lead · 2 years ago
It is and the leaders of yc even give instructions on how to best do their "launch hn."
matheusmoreira · 2 years ago
I don't think it qualifies as advertising. People come to Hacker News to see what hackers are working on. It's certainly a major reason why I come here.

Every Show HN post I've seen was interesting. Motivated me to start my own projects and polish them so I can show them here. It's a really good feeling when someone else submits your work and you get to talk about it.

Sponge5 · 2 years ago
> It's a really good feeling when someone else submits your work and you get to talk about it.

You may only "Show HN" something you've made yourself.

https://news.ycombinator.com/showhn.html

mathgeek · 2 years ago
Do you get the impression that novel shows are pushed out by the more corporate ones?
debarshri · 2 years ago
If you see here [1], many of them are building by orgs trying to sell some services. They may or may not violate the guidelines though.

[1] https://news.ycombinator.com/show

fouc · 2 years ago
yeah and that's why interesting show HNs get upvoted
GMoromisato · 2 years ago
I had an idea once to implement Borges's Library of Babel just like this: all the text is in the URL. With more sophisticated encoding, you can optimize English words. Then hook it up to a "search system" so you can search for your own name, clips of text, etc.

Eventually you'd hit the URL size limit, of course, but maybe we add a layer on top for curators to bundle sets of URLs together to produce larger texts. Maybe add some LLM magic to generate the bundles.

You'd end up with a library that has, not just every book ever written, but every book that could ever be written.

[Just kidding, of course: I know this is like saying that Notepad already has every book in existence--you just have to type them in.]

ossopite · 2 years ago
This reminds me rather of https://libraryofbabel.info/
GMoromisato · 2 years ago
Nice! That's exactly what I had in mind.

As usual, no idea is unique--it's all about who executes first!

mk12345 · 2 years ago
Nice, I had a similar idea a while ago! I wanted to support other media types, such as images, audio and webpages. It was a really fun experiment!

https://mkaandorp.github.io/hdd-of-babel/

GMoromisato · 2 years ago
Very cool!