You could also compute the speech bubbles on the client's side...
Yes, but it seems
> No JavaScript is sent to the browser.
Is a design goal. I doubt it is possible without JS. Especially inside SVG.
Yes, that was a design goal!
It is probably technically possible to have the time continue to update with just CSS on the client (based on [1]), but the initial time still has to be set server-side.
[1] https://css-tricks.com/of-course-we-can-make-a-css-only-cloc...
I'd argue this is the wrong design goal: correctness is more important.
I'm in the UK but my work PC's Internet exit node is in New York due to enforced use of corporate proxies, so the time shown to me is 5 hours out. Javascript would report the correct timezone.
It is not possible to correctly identify physical location from IP addresses. Not just because of proxies and VPNs and the accuracy of the data: you can go near a border and find your mobile phone connects to a cell tower in a neighbouring country, without even visiting! IP Geolocation is accurate enough for statistics and marketing but probably shouldn't be used for anything user-facing.
I missed a bus because my phone connected to Morocco and updated its clock, when I was on the beach in Spain. Weirdly it was near Málaga, not even that close.
I love that this comment is on a novelty meme generator. Imagine if someone was late to their job interview because they were relying on the "What a day, huh?" meme to tell the time.
Now this is an interesting idea.. a wall clock display showing the closest time-relevant meme..
(Thinking aloud) How I'd approach that:
- you could render the page using puppeteer server-side, getClientRect/calc and apply the dimensions to the path, then spit back the markup, OR
- you could use HTML + CSS to render the bubbles
"Tonight: Orange Reddit over-engineers a meme website that any normal person would just make with seven PNG files and getDay()."
Why would you need seven PNGs? And Reddit also has an orange logo, I don’t think that particular dig works.
you might be laughing now, but following the spirit of the Orange Website, I'm building a moat with all of that know-how
...is it pedantic if I ask if WASM is considered JS and / or whether it can run without any assistance from JS?
I mean in the 2000s there were a number of other options (flash, silverlight, java, probably more) but that era is behind us, and that would be extra pedantic.
It's not pedantic and actually a good question, IMO. One that, IMNSHO, isn't discussed enough.
WASM esp in the browser offers a great opportunity to "Do Things Right" that JS in the browser got all wrong in hindsight. I'm not talking about language design, but about what JS can do, access, control, etc: from telemetry to security issues.
The modern DOM apis show how this can be fixed. But there's no way we can fix "the old APIs" which are also used for fingerprinting, tracking, DOSing clients, breaking your back button, annoying scrolling etc. We can see this clearly in how browsers bolt stuff on, like popup blockers early on, and "copy to clipboard only after a human interaction" or "detect too many dialogs" or "detect CPU hogging".
WASM seems to head in the right direction: sandboxing, careful exposure to resources, proper permission systems etc.
But, as a bystander, I don't see much public discussion on how the WASM runtime/sandbox/layers in browsers can and should be shaped to i) fix and avoid mistakes JS made, and ii) while also having better DX and UX in this regard. As mentioned, just a bystander, maybe this discussion is happening, and I just missed it?