#dev 2025-08-01

2025-08-01 UTC
grufwub and NaomiAmethyst joined the channel
#
[mattl]
Made a URL shortener that doesn’t need a database. https://mat.tl/s/
#
epoch
that's a neat way of doing it
#
epoch
for an extra challenge, it might be possible to do it without any javascript somehow?
#
epoch
you can have URI fragments trigger CSS rules
#
epoch
not sure if something like, a <meta http-equiv="refresh"> that is hidden with CSS would work
#
epoch
if nothing else, you could make it show only the link to be redirect to on the page with css
#
[mattl]
hm, if you want to do a JS-free version, but I don’t know about using CSS to show the URL…
doesnm, sarna, marc_in_-, balintm, marc_in_space, ben, cobbland, bugliker02, SingeQuantique, [morganm], [Murray], [Sophia_wood] and revi joined the channel
#
[mattl]
This blew up. Made a URL shortener that doesn’t need a database. https://mat.tl/s/
#
cobbland
Smartly done. I've already borrowed it for my own site. Thanks!
#
doesnm
through it needs javascript
thegreekgeek_ joined the channel
#
[mattl]
No it doesn’t
#
[mattl]
But it won’t automatically redirect you without JavaScript, it’ll take you to the correct link on a page full of links.
#
doesnm
great ux /j
#
doesnm
[mattl]: btw why data-url and href are repeated?
Luther_Gray joined the channel
#
[mattl]
Great UX as the default behavior of web browsers?
#
[mattl]
data-url is only used for the JavaScript stuff, the regular anchor is so it works in any browser.
#
[mattl]
cobbland: send me a link to your page. I might start a list of these pages.
#
cobbland
Not much there yet. Just enough to make sure it works. But I definitely plan on using it going forward.
#
Loqi
[preview] Cobb
#
[mattl]
Awesome. Good looking site too.
#
doesnm
[mattl]: you can't make article.href ?
#
cobbland
Thank you!
#
doesnm
also downloaded over https://doesnm.cc/s/
#
[mattl]
doesnm: how would that work without JavaScript?
#
doesnm
[mattl]: switch id to anchor maybe. So you just make <li rel="bookmark"><a id="short-name" href="https://example.com">short-name</a></li>
#
[mattl]
I don’t think rel works on an li.
#
doesnm
in https://mat.tl/s/ li's have rel's to bookmark
#
[mattl]
That might be a bug of mine then.
#
[mattl]
Fixed it.
#
doesnm
i'm deleted data-url's and maked redirect to href.
#
doesnm
not sure what is broken, working at least in iceraven
#
[mattl]
What’s iceraven?
#
[mattl]
What is iceraven?
#
Loqi
It looks like we don't have a page for "iceraven" yet. Would you like to create it? (Or just say "iceraven is ____", a sentence describing the term)
#
Loqi
[preview] [fork-maintainers] iceraven-browser: Iceraven Browser
gRegor joined the channel
#
[mattl]
Ah it’s only for Android.
#
doesnm
are you on ios?
#
[mattl]
Yeah, fully. iPad, iPhone, MacBook Pro, Apple Watch, AppleTV, making a movie in Final Cut Pro.
#
doesnm
There is only a lack of Apple Vision Pro
#
[mattl]
I tried it. The fire alarm went off in the Apple Store. I didn’t like it.
[0x3b0b] joined the channel
#
capjamesg
[mattl] your URL shortener looks interesting.
#
capjamesg
Is it using JS?
#
doesnm
it is
#
[mattl]
2-3 lines of javascript, which aren’t required.
cobbland left the channel
#
[mattl]
works just fine without javascript or even CSS.
#
capjamesg
How does it work?
#
[mattl]
List item with a unique ID…. the JavaScript loads the corresponding URL and redirects to it. If you don’t have JS, the page jumps to the anchor ID.
marc_in_space and gRegorLove_ joined the channel
#
[mattl]
I think no-JS stuff should be no-CSS or minimal-CSS.
[snarfed] joined the channel
#
[snarfed]
[mattl] huh, interesting. why?
#
[mattl]
I would expect no-JS to be read by curl or something similar. I try to support it but if I’m honest I still think of JavaScript and especially CSS as new things.
#
[mattl]
As turning off JS gets harder and harder, I can see that difference becoming more obvious again.
#
[snarfed]
CSS generallly shouldn't cause problems for programmatically parsing HTML, right?
#
[mattl]
I think even the minimal browsers try to support a little bit of CSS. I used to hide that by wrapping a style tag around an @import statement. I’d prefer to not push any CSS to a browser like that and just let the users own preferences happen.
#
[snarfed]
styling is personal preference obviously, you're welcome to style your own stuff however you want!
#
[snarfed]
...just not sure I'd expand that to general advice to limit styling to appease machine interpretability
#
[snarfed]
style is valuable for humans, etc 😎
#
[mattl]
Yeah my worry is that you wind up with a situation like this. https://www.jwz.org/blog/2024/06/modern-web-technologies/
#
[snarfed]
yeah that's clearly no good. but CSS is...how many decades old? the two seem pretty different
#
[snarfed]
(and CSS generally degrades gracefully, right? browsers generally ignore new features that they don't support yet...?)
#
[mattl]
CSS is almost 30 years old but I’d say people really started using CSS for layout around 20 years ago.
#
[snarfed]
sure. and again, serving styled HTML to decades-old browsers that don't support CSS should still work and be usable, right?
#
[snarfed]
if CSS literally breaks some niche browser, and supporting that browser is an important use case, then ok! I wouldn't advise most developers or publishers to make that choice, but everyone gets to choose for themselves 🤷
jonnybarnes joined the channel
#
[mattl]
Yeah I’m talking only in the case of no-JS stuff. I’d say that making it degrade nicely is important and that includes CSS. I have no idea why Basecamp doesn’t work on a relatively new browser.
#
[mattl]
There seemed to be some misunderstanding about my thing not needing JavaScript earlier
lurkie joined the channel