Live data from Hacker News

Itty Bitty: Sites contained within their own links

itty.bitty.site

71–80 of 111 posts

Re: Itty Bitty: Sites contained within their own links

#71
post #62

Cool hack aside, can anybody think of an actual use case for this?

My mind immediately went to stuff like tickets. Can't say how many times I've gotten stuck having my ticket checked at a concert or on a train simply because there's no connectivity and the page is no longer in cache on my phone. If all the data is in the URI then it could work as an option for entirely static data. I'd say this is useful for almost anything that fits in a one page PDF.

Re: Itty Bitty: Sites contained within their own links

#72
post #71
post #62

Cool hack aside, can anybody think of an actual use case for this?

My mind immediately went to stuff like tickets. Can't say how many times I've gotten stuck having my ticket checked at a concert or on a train simply because there's no connectivity and the page is no longer in cache on my phone. If all the data is in the URI then it could work as an option for entirely static data. I'd say this is useful for almost anything that fits in a one page PDF.

How does that solve the no connectivity problem? You’d still need the site (with rendering scripts) cached.

Re: Itty Bitty: Sites contained within their own links

#73
It's a legit pattern. Compression of binary data. Encoding to base64 string. And packing into data uri. Golang out of the box has packages for handling the entire pipeline.

You get a small performance hit on page load from decoding. But its still performant and bandwidth-saving. For network constrained users this is a solution. Also consider the scenario where you are bootstrapping. Serving static content from a single server instance or S3. But still want to target a global audience ;)

Re: Itty Bitty: Sites contained within their own links

#74

This is neat! I did something similar with https://tinysite.adamdrake.com where I have a website that fits into a single ipv4 datagram (at least it did when I was using my own HTTP server). More details here: https://adamdrake.com/the-biggest-smallest-website.html

It's 9XX bytes, is the extra from TLS?

When I moved it to AWS Lambda there was some size introduced from TLS and also from some headers that AWS API Gateway adds which seem, unfortunately, impossible to easily drop (e.g., if you make the headers empty in the response, APIGW will copy them into another header and still add its own).

I might pull that service off of AWS APIGW/Lambda, in which case the size as an artifact of AGIGW would disappear again.

Re: Itty Bitty: Sites contained within their own links

#75
post #64
post #62

Cool hack aside, can anybody think of an actual use case for this?

Copy/paste content to my coworkers, like paste-bin. but without server-side storing on the paste site. It's amazing.

So rather than paste the text.. Paste the link, which they then open, to fetch the render-Middleware from this site, to render the text in the browser? Rather than just allowing the message app render the text in-line or as an attachement?

Re: Itty Bitty: Sites contained within their own links

#78

I discovered data URIs in 2014, when trying to make an app that doesn't need to be distributed through an app store. They're fun. Nihilogic made a 14KB Mario clone that can be fit into a data URI. https://web.archive.org/web/20090310220414/http://blog.nihil... I also know about the way Cemetech's jsTified TI-83 emulator parses pictures to load a calculator ROM file (steganography). https://www.cemetech.net/projects/j…

The PICO-8 "fantasy console" is a playful old-school computer style emulator that passes it's programs through images. You might even look into it's algorithms [1]. I think it'd be perfect.

[1]: http://pico-8.wikia.com/wiki/P8PNGFileFormat

Re: Itty Bitty: Sites contained within their own links

#79

I discovered data URIs in 2014, when trying to make an app that doesn't need to be distributed through an app store. They're fun. Nihilogic made a 14KB Mario clone that can be fit into a data URI. https://web.archive.org/web/20090310220414/http://blog.nihil... I also know about the way Cemetech's jsTified TI-83 emulator parses pictures to load a calculator ROM file (steganography). https://www.cemetech.net/projects/j…

The PICO-8 "fantasy console" is a playful old-school computer style emulator that passes it's programs through images. You might even look into it's algorithms [1]. I think it'd be perfect. [1]: http://pico-8.wikia.com/wiki/P8PNGFileFormat

Also the Spore Creature Creator from 2008 could export and import your creatures as PNGs. It used the least-significant bit in each color channel.
Post reply on HN