Re:Real-time updates without JavaScript
by The_suffocated on Tuesday February 06, 2018 @04:06PM
(#16319662)
But what?
[ Parent
| on HN ]
It breaks when you press `esc`. Either that, or the DOM just keeps growing and hogging memory until the tab eventually becomes unresponsive or crashes
Re:Real-time updates without JavaScript
by The_suffocated on Tuesday February 06, 2018 @04:14PM
(#16319776)
Thanks, but isn't this the same if you use a virtual DOM? Is Mithril not prone to this problem if you keep adding stuffs to the list?
With javascript you can keep an EventSource connection open (which is immune to the `esc` thing), and you can prune the DOM and let the browser GC.
Re:Real-time updates without JavaScript
by The_suffocated on Tuesday February 06, 2018 @04:28PM
(#16319956)
Thanks for the explanation. I'm too green to understand this, but I'll try to learn more about it later.
Re:Real-time updates without JavaScript
by wybiral on Tuesday February 06, 2018 @04:37PM
(#16320065)
Presumably you'll eventually write something rather than lurking for hours and then it'll refresh.
I mean, sure, it works just fine if people refrain from doing certain arbitrary things (such as the scripted spamming that's happening as I write this), but that's why the grandparent comment said it was a hack and not a trick that one might want to attempt in production.
Re:Real-time updates without JavaScript
by wybiral on Tuesday February 06, 2018 @05:32PM
(#16320563)
The spam had nothing to do with not using Javascript. I could easily have added a CAPTCHA or required accounts.
Re:Real-time updates without JavaScript
by roywiggins on Tuesday February 06, 2018 @04:39PM
(#16320081)
In extremis a <meta refresh> could be used.
Re:Real-time updates without JavaScript
by reificator on Tuesday February 06, 2018 @04:49PM
(#16320187)
But then if you refresh every ten minutes or so, and I just happen to be finally responding after that long, I'm going to lose what I'm typing.
Not necessarily: browsers are pretty good at keeping form elements state across refreshes nowadays, especially Firefox. Cursor position perhaps, but not text.
Re:Real-time updates without JavaScript
by reificator on Tuesday February 06, 2018 @09:52PM
(#16321909)
Perhaps, but certainly there will be frustration there. Especially WRT cursor position changing.
Re:Real-time updates without JavaScript
by sebazzz on Tuesday February 06, 2018 @05:02PM
(#16320321)
My Surface tablet got warmer and warmer on my lap.
Re:Real-time updates without JavaScript
by ErunamoJAZZ on Tuesday February 06, 2018 @04:09PM
(#16319708)
Page never end to load.