digitalcourage.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
Diese Instanz wird betrieben von Digitalcourage e.V. für die Allgemeinheit. Damit wir das nachhaltig tun können, erheben wir einen jährlichen Vorausbeitrag von 1€/Monat per SEPA-Lastschrifteinzug.

Server stats:

858
active users

#usetheplatform

2 posts2 participants0 posts today

How to feed the <progress> real-time data without complex protocols or constant polling?

EventSource is a #Web #API that enables real-time communication from a server to a client using server-sent events (SSE). It establishes a persistent connection, allowing the server to send updates in a simple text format.

Wikipedia says that the "media type for SSE is text/event-stream" (SSE means Server-Sent Events). It had first been specified in 2004, wow.

picostitch.hashnode.dev/events

picostitch · EventSource: Native Browser Streaming APIBy Wolfram Kriesing

828 Bytes of three small #progressive #enhancement helpers, more coming.

#SPAish - progressive enhancer for your MPA, make it feel SPAish.

github.com/wolframkriesing/SPA

// Restore scroll position
spaish.scroll.restore(...);

// Reopen the <details>
spaish.details.reopen(...);

// Restore the color scheme
spaish.colorScheme.restoreLast();

<button onclick="
spaish.colorScheme.toggle();"
>Toggle Color Scheme</button>

THIS IS A MIRROR: Go to https://codeberg.org/wolframkriesing/SPAish for the original source code! - wolframkriesing/SPAish
GitHubGitHub - wolframkriesing/SPAish: THIS IS A MIRROR: Go to https://codeberg.org/wolframkriesing/SPAish for the original source code!THIS IS A MIRROR: Go to https://codeberg.org/wolframkriesing/SPAish for the original source code! - wolframkriesing/SPAish

picossg.dev grew one version older, but just 10 lines of code.

v5.0.0 is out

See all the changes v5 brought picossg.dev/docs/changelog/#se

The most important one is probably the stats plugin. But more important I think is #SPAish a spinoff project codeberg.org/wolframkriesing/s – not yet documented and ready to use, but it has a clear direction see the docs codeberg.org/wolframkriesing/s

#ssg#web#small

Compare your #webapps and see how much memory and CPU they are using.
Oh wonder #SPAs are more prone to memory eating, by nature, there is more dynamic page content, more #JS. Already the base memory footprint is double that one of an MPA.
Just check out the your browser's task manager. #devtools
And in doubt #usetheplatform, or in other words: HTML and CSS are powerful tools and solve more problems than some may think. Try to think simple(r).

"SPA Feel – Pattern #1 – Restore Scroll Position"

Combine the inherent simplicity and performance of MPAs with the smooth user experience of SPAs, making SPAs often outdated.

picostitch.com/blog/2025/03/sp

Initially written about at mastodontech.de/@wolframkriesi

picostitch - crafting (and) JavaScriptSPA Feel – Pattern #1 – Restore Scroll Position## Introduction

With modern #CSS there is so much flexibility, I just wrote this selector:

code.source:has(~ code.result) {...}

it applies "..." only when the current `<code class=source>` has a sibling `<code class=result>`. Isn't that lovely?

Down side of course, there is more logic in the CSS and changing the HTML structure impacts these and eventually even causes dead code, but see mastodontech.de/@wolframkriesi for how to find out if you have dead code lying around.

MastodonTech.deWolfram wants peace (@wolframkriesing@mastodontech.de)Angehängt: 1 Bild Shift+Cmd+P in #chrome #devtools and search for "CSS overview", pretty nice tool which also shows you unused CSS lingering around. Best of course, if there is none ;) #browser #webdev #useThePlatform #development

I really enjoy the #fullstack development, jumping from

- database: thinking about writing a stored procedure, throwing it away
- ux/ui/django: optimizing the user flow by creating a wizard like form
- HTML: using the least markup and be most sematic
- CSS: sprinkle some animation in there
- DOM: remove nodes when they are clicked
- HTML: using dialog in a progressive enhancement way
- JavaScript: use canvas to detect the color in an incoming video stream

#useThePlatform
Thanks powerful web