Live data from Hacker News

I Stored a Website in a Favicon

timwehrle.de

101–110 of 120 posts

Re: I Stored a Website in a Favicon

#102

Love it. Did you see the old effort to store the page in the url? https://github.com/jstrieb/urlpages

That’s awesome. I took this a bit further a few years ago making a url only notepad quine that as you add data to it, creates itself. that can be saved as a bookmarklet. Have to watch the gif to understand https://github.com/con-dog/serverless-architecture

I saw one before that was doing this and saved the whole thing as a base64 stream. So the url would dynamically update and have all its data. Pretty cool. I suppose the main obstacle is now where do I load the site from, and how much can be stored in itself or an image :)

Re: I Stored a Website in a Favicon

#103
post #7

Instead of going via pixels, why not use a SVG favicon and directly store markup inside it and extract it? Use this favicon.svg: hello HN! use this in your to use a svg favicon: finally, use this in your to extract it and add it to your document body: fetch(favicon.href).then(r => r.text()).then(t => document.body.innerHTML += t.match(/ /)[0]);

Regular expressions? Ugh. Encode it properly as XML in the correct namespace, load it so, and take it from that. Or just serve the SVG file and use to embed the HTML, and include inside it. In theory you should be able to define a and use , but in practice neither Firefox nor Chromium seems to be handling that properly in a favicon, which is disappointing.

lol

Re: I Stored a Website in a Favicon

#104
post #33

Earlier quoted context omitted.

for the first time in a while on HN, i disagree with the characterisation as AI-generated. at most it was drafted with an LLM, but the final output is pretty human to me. they used the wrong it’s/its, made But. its own one-word sentence, didn’t capitalise HTML, and used “okayy” in parenthesis. all of this isn’t to criticise the writer - i enjoyed it more seeing these little imperfections that make up a blog post

Looks largely AI-written, with some human edits: https://www.pangram.com/history/9afe7542-1085-4264-9691-2172... FWIW -- I'm not as repulsed by it as the parent comment. But I do want to substantiate that it _is_ heavily LLM-written. (If you're unfamiliar, Pangram has garnered a reputation as the leading LLM-detector, with a minimal rate of false positives; IME this has come with the tradeoff of being easy to manipul…

I wouldn't trust Pangram too much. I've seen it give "100% LLM-written, high confidence" to multiple 100% human written articles (high confidence).

Re: I Stored a Website in a Favicon

#105
post #80
post #64

Earlier quoted context omitted.

ai says [^] is not portable; I did not test it. Too bad, I'll stick to [\s\S].

Too bad, indeed. It's well-defined in javascript (and thus, appropriate in this admittedly niche context). It's non-portable across different regex engines, yes.

exactly what I said

Re: I Stored a Website in a Favicon

#106

I found the agressively staccato, clearly LLM-generated content extremely difficult to read.

I complained about this style of writing on Medium a few months ago. The author of the article replied that it's a preferred style if you anticipate your writing to be read on a small smartphone screen. This kind of makes sense. Whether that article (or this one) was AI-generated or not, I don't know.

Re: I Stored a Website in a Favicon

#108
I'd love to see you try serving the exact same file for both but the trick is that you need to return different Content-Type headers depending on what is requested. When the browser requests /favicon from a navigation event it will use Accept: text/html etc, you return the file with Content-Type: text/html and inside the response you have a literally the same resource but the browser will now likely fetch with Accept: image/... and you could return the same file with Content-Type: image/png and the same resource will get used for both. Unless the browser caches the response, I feel like this would work.

If you don't control the headers of your webserver (eg GitHub Pages) I would settle for a symlink favicon.png that just links back to favicon.html which I think would trick the server into returning different Content-Types.

Re: I Stored a Website in a Favicon

#110

Earlier quoted context omitted.

That’s awesome. I took this a bit further a few years ago making a url only notepad quine that as you add data to it, creates itself. that can be saved as a bookmarklet. Have to watch the gif to understand https://github.com/con-dog/serverless-architecture

I saw one before that was doing this and saved the whole thing as a base64 stream. So the url would dynamically update and have all its data. Pretty cool. I suppose the main obstacle is now where do I load the site from, and how much can be stored in itself or an image :)

That’s a pretty clever idea to treat it as a stream, why didn’t I think of that…
Post reply on HN