Comment by rollcat
4 months ago
> Again, I get it, but I can live with visiting only the websites or gopherholes I want. [...] Even if we consider just the minimalist and well designed websites, this means hoards of content when compared to all gemini capsules.
I agree. Personally, I'm a fan of progressive enhancement.
E.g. I use this Hugo partial to hide emails; it de-obfuscates an address using JavaScript, and falls back to printing a shell command:
{{ $id := substr (sha256 .) 0 6 }}
<a id="{{ $id }}"><noscript>echo </noscript>{{ base64Encode . }}<noscript> | base64 -d -</noscript></a><script>var el = document.getElementById("{{ $id }}"); el.innerText = atob("{{ base64Encode . }}"); el.href = "mailto:" + el.innerText;</script>
(Hopefully HN will preserve all the characters.)
Similar for CSS, although that one is a forever WIP...
I can attest that CSS is very effective for obfuscating e-mail. I displayed my academic e-mail on my webpage for over half a decade using CSS to flip the text direction[1] without getting significant spam.
[1] https://superuser.com/a/235965
This kind of approach is exactly why I believe we can have a nice experience over HTTP. Progressive content enhancement nails the perfect balance between too simple and too bloated. I personally believe client side scripting is important and ideally should be used sparingly. Your example illustrates a perfectly reasonable use case where JavaScript makes sense, yet still providing a scriptless alternative that solves the problem. Nice stuff.