7 ms·
CSS-Only Chat
- dools 3y agoProps to the dev with two projects on the HN front page at once
- floomk 3y agoIs there a demo instance?
- Exuma 3y agoHow could someone make a prototype for "monstrous chat" and not include a demo link with a monstrous amount of users.
- fishtoaster 3y agoI hacked this whole thing together in a cafe in Paris over a couple days. It's not exactly what you'd call "scalable" ;). Given that it keeps a long-running streaming http connection to every client, it'd be expensive to set up servers to support this.
- revskill 3y agoIs Paris dangerous now ?
- fishtoaster 3y agoBeats me? I was on vacation there 4 years ago. :)
- floomk 3y agoI'm sure a $5 digital ocean droplet would go a very, very long way.
- PhilipWee 3y agoFinally just what i needed On another note, I once had to fetch data in powerbi, but there were some sandbox limitations on fetch requests or something I ended up fetching images instead and encoding/decoding the image bits being sent to make an arbitary fetch request
- levitate 3y agoI assume these are the alternatives that people with javascript disabled really want
- csjh 3y agorich harris' dream world
- skydhash 3y agoNah. JS is fine for apps that need it. But a lot doesn't (every blog and news site) where JS is used for obnoxious animations and dark patterns. And now the unwritten contract between users and companies has been broken, so I’d very much prefer most applications to be in the browser where they are contained instead of installed on my computer.
- bentcorner 3y agoI feel like under all these CSS hacks there lies the kernel of something where you can write javascript, transpile it into a bunch of CSS and html, and effectively run it. Javascript-less javascript.
- derefr 3y agoIf the only requirement is "using no JavaScript", you know that you don't need CSS either, right? Dark web chatrooms just use frames — one frame to render the chat transcript (using a forever-loading "Transfer-Encoding: chunked" HTML page); the other with a plain old <form> with an <input type="text"> and a <submit>.
- killingtime74 3y agoCan you talk a bit more about how it works? Is the page reloaded on submit?
- dvt 3y agoThis is an old trick, so I understand why people probably haven't seen it these days. But you have a page with two frames: the submission frame (i.e. input form, usually on the bottom of the page) is reloaded on submit, while the chat log (usually the top frame) loads infinitely.
- lelandbatey 3y agoJust to be further specific, they're talking about embedding two separate webpages inside of one page, using "iframe" HTML elements. In the bad old days you'd probably use a bare "frame" element, but those aren't valid HTML as of HTML5.
- blackbeans 3y agoI think they used a frameset with frames. It had the advantage that it could be sized to the browser window as a percentage and both frames could be refreshed/loaded independently without affecting the other.
- tester756 3y agoweren't people also implementing live chat with gifs back in the day?
- nickpeterson 3y agoRandom question, CSS is a style language, but the intent was that there could be others, are there any other style languages that are alternatives?
- Waterluvian 3y agoLESS and SASS but I imagine you mean significantly different and not just “dialects.”
- nickpeterson 3y agoI was under the impression that those were tools to generate css (I get the practicality), but is there even another one that has been proposed but never added to browsers?
- remexre 3y agoDoes https://gss.github.io/ https://gss.github.io/ count?
- Yiin 3y agoIgnoring XML based languages (XSL, PGML), some of the early ones, that never made it to browsers, were DSSSL and FOSI. There was also JSS (JavaScript Style Sheets, 1996). Mobile app development (e.g. Flutter) have their own APIs for styling, but they're still quite similar to CSS. There might be other languages used in areas I'm not familiar with.
- firecall 3y agoThe same was true of JS. But AFAIK, there is only CSS and JS. You used to have to declare the Script tag as JS, but you don’t anymore since HTML5. Because all scripts are JS. I don’t think SASS and LESS count, as are not supported by browsers natively, and require pre compilation. :-)
- qup 3y ago> You used to have to declare the Script tag as JS, but you don’t anymore since HTML5. Because all scripts are JS. I wonder how much data transfer was wasted to this.
- tambourine_man 3y agoThat’s clever, I love these kinds of hacks.
- ygt1qa8 3y agosimple is good
- hughw 3y agoSame vibe as the C++ compile-time ray tracers e.g. https://github.com/tcbrindle/raytracer.hpp https://github.com/tcbrindle/raytracer.hpp
- qrush 3y agoKevin, you absolute madlad.
- fishtoaster 3y agoHaha, thanks, Nick. :)
- BarryMilo 3y agoIsn't there a way to map keys to buttons without JS? Maybe with an ImageMap? Dear god are those still supported?
- ngckgi 3y ago[flagged]
- thrdbndndn 3y agoInspiration tweet since the author locked his account: https://web.archive.org/web/20190613094358/https://twitter.com/davywtf/status/1124130932573839360 https://web.archive.org/web/20190613094358/https://twitter.c... for the interested. Just curious, what is the update frequency of `Transfer-Encoding: chunked` web pages in browser?
- janjones 3y ago> what is the update frequency of `Transfer-Encoding: chunked` web pages in browser? The server determines that - when it sends new HTML (whenever it wants to), the client loads and displays the new content immediately.
- bawolff 3y agoTransfer-encoding chunked is not really meant to be used this way, its normaly just an optimization for the http protocol, so its basically instant/however fast the webserver sends data - with the common case being as fast as possible.
- TechBro8615 3y agoThe readme is clear and also hilarious. I love this kind of thing. Anyway, this part sounds like the sort of obscure browser idiosyncrasy that I'll read about in some exploit writeup years from now: > What's cool is that a browser won't actually load that background image until this selector is used Intuitively it strikes me as leaky, fingerprintable behavior. I don't see any obvious problem with it, but it does vaguely remind me of those hacks that could exfiltrate browsing history with clever usage of the :visited selector.
- fishtoaster 3y agoYeah, the original inspiration for this was a tweet where the poster was using that behavior to leak cursor position (by having a big grid of divs with hover-over css classes with background images)!
- throw_043838547 3y ago[dead]
- javascript_obso 3y agoI guess people interested in "no JS implementations of things" are here so I would humbly like to ask: Does anybody know of a viable way to implement (geographic) maps without JavaScript?
- Jaxan 3y agoWhat about a static image?
- deleted 3y ago[deleted]
- pcthrowaway 3y agoMapquest did this back in the day. I suppose you could use similar tricks as CSS-only chat to get the pan buttons to work without a page refresh
- thehappypm 3y agoForms. Buttons for things like pan and zoom to load images or SVGs
- TheRealNapster 3y ago[dead]
- TheRealNapster 3y ago[dead]
- jesprenj 3y agoYou can send content of typed data of an input field with CSS to a webserver, as you can use a selector that matches the end of the input field's value. https://css-tricks.com/css-keylogger/ https://css-tricks.com/css-keylogger/ (2018)
- spyke112 3y agoI may be pedantic, but this is not only CSS, there’s after all an entire Ruby backend. Wouldn’t it be more appropriate to call this something like “No-js chat”, seems to me that would be more correct and less clickbaity.
- bawolff 3y agoI feel that is overly pedantic. I think it is clear from context of headline that there is some sort of backend. If there was no backend i think thd headline would be different.
- bawolff 3y agoReminds me of https://cgiirc.org/ https://cgiirc.org/ i think older versions did nog need js
- lovegrenoble 3y agoFor a couple of people with javascript disabled?
- bilekas 3y agoThis is insane.. A great combination of old hacks and workarounds that to be quite honest, even though I've read it twice i still don't understand properly. I'm under the impression that eventually the Dom elements are just going to eventually crash the browser? I guess in the end that a moot point given i really hope nobody uses this is production!
- matthberg 3y agoI got nerd-sniped into re-implementing this in Node. Running on a local server and reusing buttons to minimize DOM exploding it's fast enough to need serverside key debounce. I suspect the original author chose to re-send the entire button set to avoid this.
- ChiperSoft 3y agoThe very first chat room I ever used was Sierra Online’s web chat way back in 93. It was comet based, just like this, and I’ve never understood why comet was never more common, especially before websockets were a thing.